Fix some activity errors
This commit is contained in:
parent
434a393f3b
commit
de5e0c958e
4 changed files with 9 additions and 7 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue