Fix membership tables for clubs without an ending membership date

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2022-02-13 17:53:05 +01:00
parent 8563a8d235
commit d9b4e0a9a9
No known key found for this signature in database
GPG key ID: 3A75C55819C8CF85

View file

@ -258,7 +258,7 @@ class Club(models.Model):
This function is called each time the club detail view is displayed.
Update the year of the membership dates.
"""
if not self.membership_start:
if not self.membership_start or not self.membership_end:
return
today = datetime.date.today()