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

Guests can't be invited if the activity is not validated

This commit is contained in:
Yohann D'ANELLO
2020-03-30 17:35:47 +02:00
parent fcb4da2db3
commit b0b3aa35a9
5 changed files with 98 additions and 80 deletions

View File

@ -44,6 +44,9 @@ class GuestForm(forms.ModelForm):
if self.activity.date_start > datetime.now():
self.add_error("inviter", _("You can't invite someone once the activity is started."))
if not self.activity.valid:
self.add_error("inviter", _("This activity is not validated yet."))
one_year = timedelta(days=365)
qs = Guest.objects.filter(