mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-04 00:42:50 +02:00
Add update note menu
This commit is contained in:
@ -379,7 +379,8 @@ class Passage(models.Model):
|
||||
final_solution=self.pool.tournament.final)
|
||||
|
||||
def avg(self, iterator) -> int:
|
||||
return sum(iterator) / len(list(iterator))
|
||||
items = [i for i in iterator if i]
|
||||
return sum(items) / len(items) if items else 0
|
||||
|
||||
@property
|
||||
def average_defender_writing(self):
|
||||
@ -581,6 +582,9 @@ class Note(models.Model):
|
||||
default=0,
|
||||
)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse_lazy("participation:passage_detail", args=(self.passage.pk,))
|
||||
|
||||
def __str__(self):
|
||||
return _("Notes of {jury} for {passage}").format(jury=self.jury, passage=self.passage)
|
||||
|
||||
|
Reference in New Issue
Block a user