attempt to fix future tournaments

apikeys
Laurent 4 months ago
parent b7e22ddfae
commit 71e3cdc788
  1. 6
      tournaments/models/tournament.py

@ -1038,9 +1038,9 @@ class Tournament(BaseModel):
# tomorrow = datetime.now().date() + timedelta(days=1) # tomorrow = datetime.now().date() + timedelta(days=1)
timezoned_datetime = self.local_start_date() timezoned_datetime = self.local_start_date()
start = timezoned_datetime.replace(hour=0, minute=0) start = timezoned_datetime.replace(hour=0, minute=0)
now_utc = timezone.now() # now_utc = timezone.now()
now = now_utc.astimezone(self.timezone()) # now = now_utc.astimezone(self.timezone())
return start >= now return start >= timezone.now()
def has_ended(self): def has_ended(self):
return self.end_date is not None return self.end_date is not None

Loading…
Cancel
Save