clubs
Laurent 1 year ago
parent 1fee9d90ba
commit 72352d06c1
  1. 16
      tournaments/models/tournament.py

@ -378,7 +378,6 @@ class Tournament(models.Model):
}
def broadcasted_matches_and_group_stages(self):
matches = []
group_stages = []
@ -388,14 +387,15 @@ class Tournament(models.Model):
else:
# last_started_match = self.first_unfinished_match()
current_round = self.round_to_show()
previous_round = self.round_for_index(current_round.index + 1)
if current_round:
previous_round = self.round_for_index(current_round.index + 1)
if previous_round:
matches.extend(current_round.get_matches_recursive(True))
matches.extend(previous_round.get_matches_recursive(True))
else:
matches.extend(current_round.all_matches(True))
group_stages = self.live_group_stages()
if previous_round:
matches.extend(current_round.get_matches_recursive(True))
matches.extend(previous_round.get_matches_recursive(True))
else:
matches.extend(current_round.all_matches(True))
group_stages = self.live_group_stages()
return matches, group_stages

Loading…
Cancel
Save