From 03cab14cf237473bf91aa3a78ae3e369616b447a Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Thu, 5 Jun 2025 07:22:51 +0200 Subject: [PATCH] fix crash with get_tournament missing in place of tournament() in match.py --- tournaments/models/match.py | 2 +- tournaments/models/tournament.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tournaments/models/match.py b/tournaments/models/match.py index 044bba1..25f0a15 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -307,7 +307,7 @@ class Match(TournamentSubModel): return self.start_date.astimezone(timezone) def local_planned_start_date(self): - timezone = self.tournament().timezone() + timezone = self.get_tournament().timezone() return self.planned_start_date.astimezone(timezone) def formatted_start_date(self): diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index c9868ac..86c380d 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -594,7 +594,7 @@ class Tournament(BaseModel): first_match = min(valid_matches, key=lambda match: match.start_date) # Format the date - timezone = first_match.tournament().timezone() + timezone = first_match.get_tournament().timezone() local_start = first_match.start_date.astimezone(timezone) time_format = 'l d M' formatted_schedule = f" - {formats.date_format(local_start, format=time_format)}"