Fix issue where there is no club

clubs
Laurent 1 year ago
parent 6b6871b2a1
commit d6a4a471ed
  1. 7
      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 = []

Loading…
Cancel
Save