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)