From f9bdc75176f469cff5fa8ba2773874986231ec32 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Mon, 7 Aug 2023 20:36:28 +0700 Subject: [PATCH] Fix bug --- judge/models/contest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/models/contest.py b/judge/models/contest.py index f9bd0c4..1129076 100644 --- a/judge/models/contest.py +++ b/judge/models/contest.py @@ -542,7 +542,7 @@ class Contest(models.Model, PageVotable, Bookmarkable): return True # If the user is a contest organizer or curator - if user and user.profile.id in self.editor_ids: + if hasattr(user, "profile") and user.profile.id in self.editor_ids: return True return False