fix match group display

sync
Laurent 9 months ago
parent cba4cb9367
commit 56e3917999
  1. 5
      tournaments/models/tournament.py

@ -448,11 +448,12 @@ class Tournament(BaseModel):
groups = []
if self.display_matches():
for round in self.rounds.filter(parent=None, group_stage_loser_bracket=False).all().order_by('index'):
rounds = self.rounds.filter(parent=None, group_stage_loser_bracket=False).all().order_by('index')
for round in rounds:
groups.extend(self.round_match_groups(round, broadcasted, hide_empty_matches=True))
if self.display_group_stages():
for round in self.rounds.all().order_by('index'):
for round in self.round_set.filter(parent=None, group_stage_loser_bracket=True).all().order_by('index'):
groups.extend(self.round_match_groups(round, broadcasted, hide_empty_matches=True))
group_stages = sorted(self.sorted_group_stages(), key=lambda s: (-s.step, s.index))

Loading…
Cancel
Save