Reorder conditions in display_matches method for clarity

apikeys
Razmig Sarkissian 4 months ago
parent 0ebce12199
commit f3ba9d4fc9
  1. 4
      tournaments/models/tournament.py

@ -958,11 +958,11 @@ class Tournament(BaseModel):
def display_matches(self): def display_matches(self):
if self.end_date is not None: if self.end_date is not None:
return True return True
if self.publish_brackets:
return True
bracket_matches = self.bracket_matches() bracket_matches = self.bracket_matches()
if len(bracket_matches) == 0: if len(bracket_matches) == 0:
return self.display_group_stages() return self.display_group_stages()
if self.publish_brackets:
return True
first_match_start_date = self.first_match_start_date(bracket_matches) first_match_start_date = self.first_match_start_date(bracket_matches)
if first_match_start_date is None: if first_match_start_date is None:

Loading…
Cancel
Save