Add null check for tournament in match formatting

apikeys
Razmig Sarkissian 4 months ago
parent 5dbc70976c
commit 6e25edb545
  1. 3
      tournaments/models/match.py

@ -479,7 +479,8 @@ class Match(TournamentSubModel):
ended = self.end_date is not None ended = self.end_date is not None
live_format = "Format " live_format = "Format "
if self.get_tournament().day_duration >= 7: tournament = self.get_tournament()
if tournament and tournament.day_duration >= 7:
live_format = "" live_format = ""
live_format = live_format + FederalMatchCategory(self.format).format_label_short live_format = live_format + FederalMatchCategory(self.format).format_label_short

Loading…
Cancel
Save