From 673f836bd858965b2279a8e01da95f2d959202ce Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 13 Mar 2025 14:28:53 +0100 Subject: [PATCH] fix crash --- tournaments/models/team_registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tournaments/models/team_registration.py b/tournaments/models/team_registration.py index 4364767..28fcf29 100644 --- a/tournaments/models/team_registration.py +++ b/tournaments/models/team_registration.py @@ -102,7 +102,7 @@ class TeamRegistration(SideStoreModel): return "Détail de l'équipe" 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() 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]