diff --git a/tournaments/models/match.py b/tournaments/models/match.py index b8893b9..1e446e0 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -34,7 +34,12 @@ class Match(models.Model): return self.group_stage.tournament def court_name(self, index): - return self.tournament().event.club.court_name(index) + club = self.tournament().event.club + if club: + return club.court_name(index) + elif index is not None: + return f"Terrain {index + 1}" + return "" def backup_name(self): items = []