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): def broadcasted_matches_and_group_stages(self):
matches = [] matches = []
group_stages = [] group_stages = []
@ -388,14 +387,15 @@ class Tournament(models.Model):
else: else:
# last_started_match = self.first_unfinished_match() # last_started_match = self.first_unfinished_match()
current_round = self.round_to_show() 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: if previous_round:
matches.extend(current_round.get_matches_recursive(True)) matches.extend(current_round.get_matches_recursive(True))
matches.extend(previous_round.get_matches_recursive(True)) matches.extend(previous_round.get_matches_recursive(True))
else: else:
matches.extend(current_round.all_matches(True)) matches.extend(current_round.all_matches(True))
group_stages = self.live_group_stages() group_stages = self.live_group_stages()
return matches, group_stages return matches, group_stages

Loading…
Cancel
Save