From 7f80caf41157f7618a2191737335343694c33156 Mon Sep 17 00:00:00 2001 From: Laurent Date: Tue, 17 Dec 2024 16:57:50 +0100 Subject: [PATCH] Fix potential 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 27d281c..06ff2d4 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -475,7 +475,7 @@ class Tournament(models.Model): key=lambda m: ( m.round.index, # Sort by Round index first m.round.get_depth(), - m.name, # Then by Round depth + m.name or '', # Then by Round depth, using empty string if name is None ) ) group = self.create_match_group('Matchs de classement', ranking_matches)