Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix submission visibility in contests
Browse files Browse the repository at this point in the history
After #1843, because of a misplaced bracket, users can't see submissions 
from contests with visible scoreboards.
Riolku committed Feb 22, 2022
1 parent 2c9227f commit 7236fa4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions judge/views/submission.py
Original file line number Diff line number Diff line change
@@ -251,10 +251,10 @@ def _get_queryset(self):
contest_queryset = Contest.objects.filter(Q(authors=self.request.profile) |
Q(curators=self.request.profile) |
Q(scoreboard_visibility=Contest.SCOREBOARD_VISIBLE) |
Q(end_time__lt=timezone.now()), scoreboard_visibility__in=(
Contest.SCOREBOARD_AFTER_PARTICIPATION,
Contest.SCOREBOARD_AFTER_CONTEST,
)) \
Q(end_time__lt=timezone.now(), scoreboard_visibility__in=(
Contest.SCOREBOARD_AFTER_PARTICIPATION,
Contest.SCOREBOARD_AFTER_CONTEST,
))) \
.distinct()
queryset = queryset.filter(Q(user=self.request.profile) |
Q(contest_object__in=contest_queryset) |

0 comments on commit 7236fa4

Please sign in to comment.