diff --git a/tournaments/models/club.py b/tournaments/models/club.py index 10f848f..77d2053 100644 --- a/tournaments/models/club.py +++ b/tournaments/models/club.py @@ -28,4 +28,8 @@ class Club(models.Model): for court in self.court_set.all(): if court.index == index and court.name is not None and len(court.name) > 0: return court.name - return f"Terrain {index + 1}" + + if index is not None: + return f"Terrain {index + 1}" + + return ""