mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-30 04:13:01 +00:00
Compare commits
2 Commits
8dc524df67
...
332f763458
Author | SHA1 | Date | |
---|---|---|---|
|
332f763458 | ||
|
12c93ff9da |
@ -295,6 +295,12 @@ class Club(models.Model):
|
||||
|
||||
today = datetime.date.today()
|
||||
|
||||
# Avoid any problems on February 29
|
||||
if self.membership_start.month == 2 and self.membership_start.day == 29:
|
||||
self.membership_start -= datetime.timedelta(days=1)
|
||||
if self.membership_end.month == 2 and self.membership_end.day == 29:
|
||||
self.membership_end += datetime.timedelta(days=1)
|
||||
|
||||
while today >= datetime.date(self.membership_start.year + 1,
|
||||
self.membership_start.month, self.membership_start.day):
|
||||
if self.membership_start:
|
||||
|
Loading…
Reference in New Issue
Block a user