Commit 2bd1121e by Félicie

error messages specified

parent 15bd022d
...@@ -223,9 +223,11 @@ def change_shift(request): ...@@ -223,9 +223,11 @@ def change_shift(request):
response = {'result': True} response = {'result': True}
else: else:
response = {'result': False} response = {'msg': "Fail to create shift"}
return JsonResponse(response, status=500)
else: else:
response = {'result': False} response = {'msg': "Bad arguments"}
return JsonResponse(response, status=400)
return JsonResponse(response) return JsonResponse(response)
else: else:
return HttpResponseForbidden() return HttpResponseForbidden()
......
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