Commit deae61cc by François C.

Log errors raised while export_orders process

parent cdb288c9
Pipeline #2415 passed with stage
in 1 minute 26 seconds
......@@ -362,6 +362,7 @@ class Orders(models.Model):
res = o_api.execute('purchase.order', 'get_received_orders_between_dates', [], params)
except Exception as e:
res["error"] = str(e)
coop_logger.error('get_orders_between_dates : %s', str(e))
return res
......
......@@ -427,4 +427,5 @@ class ExportOrders(View):
return response
except Exception as e:
error = "Une erreur est survenue, merci de contacter le service informatique."
coop_logger.error("Erreur export_orders : %s", str(e))
return JsonResponse({'erreur': error, 'details': str(e)})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment