fix issue with locatime

online_registration
Raz 10 months ago
parent 61129b318a
commit de70cbc93c
  1. 6
      tournaments/models/tournament.py

@ -807,10 +807,10 @@ class Tournament(models.Model):
if self.end_date is not None: if self.end_date is not None:
return is_build_and_not_empty return is_build_and_not_empty
if timezone.now().date() >= timezone.localtime(self.start_date): if timezone.now() >= timezone.localtime(self.start_date):
return is_build_and_not_empty return is_build_and_not_empty
minimum_publish_date = timezone.localtime(self.creation_date).replace(hour=9, minute=0) + timedelta(days=1) minimum_publish_date = self.creation_date.replace(hour=9, minute=0) + timedelta(days=1)
return timezone.now() >= minimum_publish_date return timezone.now() >= timezone.localtime(minimum_publish_date)
def display_teams(self): def display_teams(self):
if self.end_date is not None: if self.end_date is not None:

Loading…
Cancel
Save