bug du jour 31 juillet (bissextile)

This commit is contained in:
korenstin 2024-07-30 02:52:11 +02:00
parent b8f81048a5
commit 32e6a444d9
1 changed files with 2 additions and 1 deletions

View File

@ -295,7 +295,8 @@ class Club(models.Model):
today = datetime.date.today()
while (today - self.membership_start).days >= 365:
while today >= datetime.date(self.membership_start.year + 1,
self.membership_start.month, self.membership_start.day):
if self.membership_start:
self.membership_start = datetime.date(self.membership_start.year + 1,
self.membership_start.month, self.membership_start.day)