Merge branch 'main' into online_registration

online_registration
Raz 10 months ago
commit 59ce6b55ff
  1. 23
      tournaments/models/tournament.py
  2. 12511
      tournaments/static/rankings/CLASSEMENT-PADEL-DAMES-01-2025.csv
  3. 80000
      tournaments/static/rankings/CLASSEMENT-PADEL-MESSIEURS-01-2025.csv

@ -731,17 +731,20 @@ class Tournament(models.Model):
# all started matches have ended, possibly # all started matches have ended, possibly
last_finished_match = self.last_finished_match() last_finished_match = self.last_finished_match()
# print(f'last_finished_match = {last_finished_match.name}') if last_finished_match:
round_root_index = last_finished_match.round.root_round().index # print(f'last_finished_match = {last_finished_match.name}')
# print(f'round_index = {round_root_index}') round_root_index = last_finished_match.round.root_round().index
if round_root_index == 0: # print(f'round_index = {round_root_index}')
return last_finished_match.round if round_root_index == 0:
else: return last_finished_match.round
round = self.round_set.filter(parent=None,index=round_root_index-1).first()
if round:
return round
else: else:
return None round = self.round_set.filter(parent=None,index=round_root_index-1).first()
if round:
return round
else:
return None
else:
return None
def last_started_match(self): def last_started_match(self):
matches = [m for m in self.all_matches(False) if m.start_date] matches = [m for m in self.all_matches(False) if m.start_date]

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save