Use better field
This commit is contained in:
parent
c3cecb3f58
commit
e1a38d42c3
1 changed files with 2 additions and 3 deletions
|
@ -254,9 +254,8 @@ class Submission(models.Model):
|
|||
if self.problem.is_public and user.has_perm("judge.view_public_submission"):
|
||||
return True
|
||||
|
||||
if hasattr(
|
||||
self, "contest"
|
||||
) and self.contest.participation.contest.is_editable_by(user):
|
||||
contest = self.contest_object
|
||||
if contest and contest.is_editable_by(user):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue