mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 12:38:26 +02:00
datetime are time-zoned
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import random
|
||||
from datetime import datetime
|
||||
from datetime import timezone
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
@ -157,7 +157,7 @@ class DocumentView(LoginRequiredMixin, View):
|
||||
|
||||
if isinstance(doc, Solution):
|
||||
for pool in doc.pools.all():
|
||||
if pool.round == 2 and datetime.now() < doc.tournament.date_solutions_2:
|
||||
if pool.round == 2 and timezone.now() < doc.tournament.date_solutions_2:
|
||||
continue
|
||||
if self.request.user.team in pool.teams.all():
|
||||
grant = True
|
||||
|
Reference in New Issue
Block a user