attempt to fix future tournaments #2

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

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

Loading…
Cancel
Save