diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 1541ea6..4665aed 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -160,7 +160,16 @@ class Tournament(models.Model): return "Annulé" teams = self.teams() - if self.supposedly_in_progress() or self.end_date is not None: + if self.end_date is not None: + count = self.team_count + if count > 0: + word = "équipe" + if count > 1: + word = word + "s" + return f"{count} {word}" + else: + return None + if self.supposedly_in_progress(): teams = [t for t in teams if t.stage != "Attente"] if teams is not None and len(teams) > 0: word = "équipe"