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"):
|
if self.problem.is_public and user.has_perm("judge.view_public_submission"):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if hasattr(
|
contest = self.contest_object
|
||||||
self, "contest"
|
if contest and contest.is_editable_by(user):
|
||||||
) and self.contest.participation.contest.is_editable_by(user):
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in a new issue