Commit 96786768 by François C.

some some fixes

parent ddcbb3a0
...@@ -284,7 +284,6 @@ function create_pair(payload) { ...@@ -284,7 +284,6 @@ function create_pair(payload) {
data.responseJSON.errors.map(function(error) { data.responseJSON.errors.map(function(error) {
message += ('\n' + error); message += ('\n' + error);
return null; return null;
}); });
} }
......
...@@ -123,7 +123,7 @@ def get_orders_attachment(request): ...@@ -123,7 +123,7 @@ def get_orders_attachment(request):
for item in res: for item in res:
if 'error' in item: if 'error' in item:
return JsonResponse(res, status=500) return JsonResponse(res, status=500, safe=False)
return JsonResponse({'res': res}) return JsonResponse({'res': res})
...@@ -133,6 +133,7 @@ def export_one(request, oid): ...@@ -133,6 +133,7 @@ def export_one(request, oid):
oid = int(oid) oid = int(oid)
order = Order(oid) order = Order(oid)
order_data = order.export() order_data = order.export()
if ('success' in order_data) and (order_data['success'] is True): if ('success' in order_data) and (order_data['success'] is True):
now = datetime.datetime.now() now = datetime.datetime.now()
taxes = 0 taxes = 0
...@@ -176,7 +177,7 @@ def export_one(request, oid): ...@@ -176,7 +177,7 @@ def export_one(request, oid):
# return response # return response
except Exception as e: except Exception as e:
msg = str(e) msg = str(e)
coop_logger.error("Order export error : %s", msg)
return JsonResponse({"msg": msg}, safe=False) return JsonResponse({"msg": msg}, safe=False)
def export_regex(request, string): def export_regex(request, string):
......
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