Skip to content

Commit

Permalink
is_in_contest should return True for spectators before contest begins
Browse files Browse the repository at this point in the history
  • Loading branch information
hieplpvip committed Oct 30, 2023
1 parent 2bfa6ad commit 34aee45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion judge/models/contest.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def is_in_contest(self, user):
if user.is_authenticated:
profile = user.profile
return profile and profile.current_contest is not None and profile.current_contest.contest == self \
and profile.current_contest.contest.can_join
and (profile.current_contest.contest.can_join or profile.current_contest.spectate)
return False

def can_see_own_scoreboard(self, user):
Expand Down

0 comments on commit 34aee45

Please sign in to comment.