Use better field

This commit is contained in:
cuom1999 2023-10-11 20:45:32 -05:00
parent c3cecb3f58
commit e1a38d42c3

View file

@ -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