This commit is contained in:
Ross
2021-12-10 21:58:24 +00:00
parent dfd3308070
commit d6cfb69829
+1 -1
View File
@@ -267,7 +267,7 @@ def loadJsonAnswer(answer):
# The model should catch invalid data but this should be less intensive
max_int = 2147483647
if answer["cid"] > max_int or answer["eid"] > max_int:
return False, JsonResponse({"success": False})
return False, JsonResponse({"success": False, "error": "invalid candidate id"})
exam = get_object_or_404(Exam, pk=answer["eid"])