.
This commit is contained in:
+5
-4
@@ -669,11 +669,12 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
n = 0
|
n = 0
|
||||||
|
|
||||||
for answer in json.loads(request.POST.get("answers")):
|
for answer in json.loads(request.POST.get("answers")):
|
||||||
try:
|
|
||||||
ret_status, ret = self.loadJsonAnswer(answer)
|
ret_status, ret = self.loadJsonAnswer(answer)
|
||||||
except:
|
#try:
|
||||||
# We catch the error here so users get an error (rather than 500)
|
# ret_status, ret = self.loadJsonAnswer(answer)
|
||||||
return JsonResponse({"success": False, "error": "Invalid data"})
|
#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:
|
# if ret is not True:
|
||||||
# return ret
|
# return ret
|
||||||
|
|||||||
Reference in New Issue
Block a user