|
|
|
@ -26,6 +26,6 @@ class Club(models.Model): |
|
|
|
|
|
|
|
|
|
|
|
def court_name(self, index): |
|
|
|
def court_name(self, index): |
|
|
|
for court in self.court_set.all(): |
|
|
|
for court in self.court_set.all(): |
|
|
|
if court.index == index and court.name: |
|
|
|
if court.index == index and court.name is not None and len(court.name) > 0: |
|
|
|
return court.name |
|
|
|
return court.name |
|
|
|
return f"Terrain {index}" |
|
|
|
return f"Terrain {index + 1}" |
|
|
|
|