fix crash with get_tournament missing in place of tournament() in

match.py
sync3
Razmig Sarkissian 5 months ago
parent 150d44ad0a
commit 03cab14cf2
  1. 2
      tournaments/models/match.py
  2. 2
      tournaments/models/tournament.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):

@ -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)}"

Loading…
Cancel
Save