From 807405ece221e94b10abba760fdfdd54097c8569 Mon Sep 17 00:00:00 2001 From: Ewout Verlinde Date: Fri, 24 May 2024 15:25:31 +0200 Subject: [PATCH] fix: for real now :skull: --- backend/api/permissions/submission_permissions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/api/permissions/submission_permissions.py b/backend/api/permissions/submission_permissions.py index ee85970b..77875d44 100644 --- a/backend/api/permissions/submission_permissions.py +++ b/backend/api/permissions/submission_permissions.py @@ -42,7 +42,7 @@ def has_permission(self, request: Request, view: APIView) -> bool: return True def has_object_permission(self, request: Request, view: APIView, submission: Submission) -> bool: - if is_student(request.user) and submission.group.students.contains(request.user): + if is_student(request.user) and submission.group.students.filter(id=request.user.id): return True if is_teacher(request.user) or is_assistant(request.user):