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

Protect all from update if the WEI is ended (or not started), remove useless fixture

This commit is contained in:
Yohann D'ANELLO
2020-04-20 04:53:26 +02:00
parent 16af9ac0ea
commit 47b9b53591
5 changed files with 124 additions and 83 deletions

View File

@ -29,6 +29,9 @@ class WEIClub(Club):
@property
def is_current_wei(self):
"""
We consider that this is the current WEI iff there is no future WEI planned.
"""
return not WEIClub.objects.filter(date_start__gt=self.date_start).exists()
def update_membership_dates(self):