Commit 9910da12 by François C.

Merge branch 'from_supercoop_fixes' into adaptation_supercoop

parents c805631f 96786768
Pipeline #2348 passed with stage
in 2 minutes 8 seconds
......@@ -284,7 +284,6 @@ function create_pair(payload) {
data.responseJSON.errors.map(function(error) {
message += ('\n' + error);
return null;
});
}
......
......@@ -123,7 +123,7 @@ def get_orders_attachment(request):
for item in res:
if 'error' in item:
return JsonResponse(res, status=500)
return JsonResponse(res, status=500, safe=False)
return JsonResponse({'res': res})
......@@ -133,6 +133,7 @@ def export_one(request, oid):
oid = int(oid)
order = Order(oid)
order_data = order.export()
if ('success' in order_data) and (order_data['success'] is True):
now = datetime.datetime.now()
taxes = 0
......@@ -176,7 +177,7 @@ def export_one(request, oid):
# return response
except Exception as e:
msg = str(e)
coop_logger.error("Order export error : %s", msg)
return JsonResponse({"msg": msg}, safe=False)
def export_regex(request, string):
......@@ -258,4 +259,4 @@ def print_product_labels(request):
res['errors'].append(pres)
except Exception as e:
res['error_ext'] = str(e)
return JsonResponse({'res': res}, safe=False)
\ No newline at end of file
return JsonResponse({'res': res}, safe=False)
......@@ -591,4 +591,4 @@ class Shelfs(models.Model):
except Exception as e:
res['error'] = str(e)
coop_logger.error("Rayons, make_products_shelf_links : %s", str(e))
return res
\ No newline at end of file
return res
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