.
This commit is contained in:
+6
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user