1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Fix some activity errors

This commit is contained in:
Yohann D'ANELLO
2020-08-06 14:11:55 +02:00
parent 434a393f3b
commit de5e0c958e
4 changed files with 9 additions and 7 deletions

View File

@ -1,7 +1,7 @@
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from datetime import timedelta, datetime
from datetime import timedelta
from threading import Thread
from django.conf import settings
@ -236,7 +236,7 @@ class Guest(models.Model):
one_year = timedelta(days=365)
if not force_insert:
if self.activity.date_start > datetime.now():
if self.activity.date_start > timezone.now():
raise ValidationError(_("You can't invite someone once the activity is started."))
if not self.activity.valid: