bracket-feature
laurent 11 months ago
commit 60ae858ad9
  1. 3
      tournaments/models/tournament.py

@ -690,6 +690,7 @@ class Tournament(models.Model):
# all started matches have ended, possibly
last_finished_match = self.last_finished_match()
if last_finished_match:
# print(f'last_finished_match = {last_finished_match.name}')
round_root_index = last_finished_match.round.root_round().index
# print(f'round_index = {round_root_index}')
@ -701,6 +702,8 @@ class Tournament(models.Model):
return round
else:
return None
else:
return None
def last_started_match(self):
matches = [m for m in self.all_matches(False) if m.start_date]

Loading…
Cancel
Save