From 253693d1ea9ef69013bf39a0326bb53863b3cd38 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 2 Jun 2022 22:14:01 -0500 Subject: [PATCH] Fix submission page bug --- judge/views/submission.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/judge/views/submission.py b/judge/views/submission.py index 65656c2..078dd61 100644 --- a/judge/views/submission.py +++ b/judge/views/submission.py @@ -533,10 +533,11 @@ class ProblemSubmissionsBase(SubmissionsListBase): ) def access_check_contest(self, request): - if self.in_contest and not self.contest.can_see_own_scoreboard(request.user): - raise Http404() - if not self.contest.is_accessible_by(request.user): - raise Http404() + if self.in_contest: + if not self.contest.can_see_own_scoreboard(request.user): + raise Http404() + if not self.contest.is_accessible_by(request.user): + raise Http404() def access_check(self, request): if self.check_contest_in_access_check: