From b73f6985a685e0a324d72b2050d3afe6e78766b7 Mon Sep 17 00:00:00 2001 From: Laurent Date: Sat, 16 Mar 2024 09:10:36 +0100 Subject: [PATCH] adds log --- tournaments/models/tournament.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index a098a92..4374dfc 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -56,13 +56,13 @@ class Tournament(models.Model): def team_summons(self): summons = [] for team_registration in self.teamregistration_set.all(): - match = None - match = team_registration.next_match() - if match: + next_match = team_registration.next_match() + if next_match: + print(f"MATCH ID = {next_match.id}") names = team_registration.team_names() - stage = match.stage_name() + stage = next_match.stage_name() weight = team_registration.weight() - summon = TeamSummon(names, match.start_date, weight, stage, team_registration.logo) + summon = TeamSummon(names, next_match.start_date, weight, stage, team_registration.logo) summons.append(summon) summons.sort(key=lambda s: s.weight)