This commit is contained in:
Ross
2022-02-28 22:46:08 +00:00
parent 3d4b1040f7
commit 14c1437b70
+2 -2
View File
@@ -354,7 +354,7 @@ class ExamViews(View, LoginRequiredMixin):
return False return False
if ( if (
self.app_name == "longs" self.app_name == "longs"
and not user.groups.filter(name__in=("long_checker")).exists() and not user.groups.filter(name__in=("long_checker",)).exists()
): ):
return False return False
if ( if (
@@ -612,7 +612,7 @@ class ExamViews(View, LoginRequiredMixin):
if request.is_ajax() and request.method == "POST": if request.is_ajax() and request.method == "POST":
if not self.check_user_edit_access(request.user, exam_id=pk): if not self.check_user_edit_access(request.user, exam_id=pk):
data = {"status": "error, invalid permisions"} data = {"status": "invalid permisions"}
return JsonResponse(data, status=400) return JsonResponse(data, status=400)
exam = get_object_or_404(self.Exam, pk=pk) exam = get_object_or_404(self.Exam, pk=pk)