This commit is contained in:
Ross
2021-12-12 15:40:58 +00:00
parent d3a98982eb
commit 86890a104a
+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