sync
Laurent 8 months ago
parent c285bb1a03
commit 673f836bd8
  1. 2
      tournaments/models/team_registration.py

@ -102,7 +102,7 @@ class TeamRegistration(SideStoreModel):
return "Détail de l'équipe" return "Détail de l'équipe"
def next_match(self): def next_match(self):
all_matches = [ts.match for ts in self.team_scores.all()] all_matches = [ts.match for ts in self.team_scores.all() if ts.match is not None]
now = timezone.now() now = timezone.now()
all_matches = sorted(all_matches, key=lambda m: m.start_date if m.start_date is not None else now) all_matches = sorted(all_matches, key=lambda m: m.start_date if m.start_date is not None else now)
matches = [m for m in all_matches if m.end_date is None] matches = [m for m in all_matches if m.end_date is None]

Loading…
Cancel
Save