1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-24 02:28:49 +02:00

Update permissions for juries presidents

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-03-24 17:42:09 +01:00
parent 0b9079b431
commit d2c1a826a8
4 changed files with 83 additions and 38 deletions

View File

@ -816,6 +816,10 @@ class Solution(models.Model):
unique=True,
)
@property
def tournament(self):
return Tournament.final_tournament() if self.final_solution else self.participation.tournament
def __str__(self):
return _("Solution of team {team} for problem {problem}")\
.format(team=self.participation.team.name, problem=self.problem)\
@ -954,6 +958,9 @@ class Note(models.Model):
def modal_name(self):
return f"updateNotes{self.pk}"
def has_any_note(self):
return any(self.get_all())
def __str__(self):
return _("Notes of {jury} for {passage}").format(jury=self.jury, passage=self.passage)