From 9a74f44658a42b4465243d9f12b4e52d44aef76f Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 21 Oct 2024 11:27:23 +0200 Subject: [PATCH] Fix crash --- tournaments/models/tournament.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 843e3f9..bb1c6e3 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -234,7 +234,7 @@ class Tournament(models.Model): summon = TeamSummon(names, next_match.start_date, weight, stage, next_match.court_name(next_match.court_index), team_registration.logo) summons.append(summon) - summons.sort(key=lambda s: s.date) + summons.sort(key=lambda s: (s.date is None, s.date or datetime.min)) return summons def has_summons(self):