From 1c6c910a8ae1e64231c2fbbaa6df0f5c90f34a42 Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 27 Mar 2025 15:33:51 +0100 Subject: [PATCH 1/2] Fix crash --- tournaments/models/group_stage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tournaments/models/group_stage.py b/tournaments/models/group_stage.py index a786de0..5c43b3c 100644 --- a/tournaments/models/group_stage.py +++ b/tournaments/models/group_stage.py @@ -4,7 +4,7 @@ from django.db import models from . import SideStoreModel, Tournament, FederalMatchCategory import uuid from ..utils.extensions import format_seconds -# from datetime import datetime, timedelta +from datetime import timedelta from django.utils import timezone from django.db.models import Count, Q From 85d1f54e13b1aa1410c5524c53dda4670b5350d1 Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 27 Mar 2025 16:02:27 +0100 Subject: [PATCH 2/2] remove logs --- tournaments/models/team_registration.py | 6 +++--- tournaments/models/tournament.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tournaments/models/team_registration.py b/tournaments/models/team_registration.py index 763add7..5d468d1 100644 --- a/tournaments/models/team_registration.py +++ b/tournaments/models/team_registration.py @@ -177,9 +177,9 @@ class TeamRegistration(SideStoreModel): def get_matches(self): matches = Match.objects.filter(team_scores__team_registration=self).distinct() - print(f"All matches for team {self.id}: {matches.count()}") - for match in matches: - print(f"Match {match.id}: start_date={match.start_date}, end_date={match.end_date}") + # print(f"All matches for team {self.id}: {matches.count()}") + # for match in matches: + # print(f"Match {match.id}: start_date={match.start_date}, end_date={match.end_date}") return matches def get_upcoming_matches(self): diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index b170374..24af6d5 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -278,7 +278,7 @@ class Tournament(BaseModel): def team_summons(self): summons = [] if self.supposedly_in_progress() and self.end_date is None: - print('>>> team_summons supposedly_in_progress') + # print('>>> team_summons supposedly_in_progress') for team in self.teams(False): names = team.names stage = team.stage @@ -286,7 +286,7 @@ class Tournament(BaseModel): summon = TeamSummon(team.team_registration.id, names, team.date, weight, stage, "", team.image, self.day_duration) summons.append(summon) else: - print('>>> team_summons') + # print('>>> team_summons') for team_registration in self.team_registrations.all(): if team_registration.is_valid_for_summon(): next_match = team_registration.next_match()