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"):
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