This commit is contained in:
Ross
2021-12-12 16:40:21 +00:00
parent bc51f829eb
commit da7ac995c6
+6 -5
View File
@@ -669,11 +669,12 @@ class ExamViews(View, LoginRequiredMixin):
n = 0
for answer in json.loads(request.POST.get("answers")):
try:
ret_status, ret = self.loadJsonAnswer(answer)
except:
# We catch the error here so users get an error (rather than 500)
return JsonResponse({"success": False, "error": "Invalid data"})
ret_status, ret = self.loadJsonAnswer(answer)
# try:
# ret_status, ret = self.loadJsonAnswer(answer)
# except:
# # We catch the error here so users get an error (rather than 500)
# return JsonResponse({"success": False, "error": "Invalid data"})
# if ret is not True:
# return ret