mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-07-08 16:20:18 +02:00
Compare commits
2 Commits
d3273e9ee2
...
d9b4e0a9a9
Author | SHA1 | Date | |
---|---|---|---|
d9b4e0a9a9
|
|||
8563a8d235
|
@ -258,7 +258,7 @@ class Club(models.Model):
|
|||||||
This function is called each time the club detail view is displayed.
|
This function is called each time the club detail view is displayed.
|
||||||
Update the year of the membership dates.
|
Update the year of the membership dates.
|
||||||
"""
|
"""
|
||||||
if not self.membership_start:
|
if not self.membership_start or not self.membership_end:
|
||||||
return
|
return
|
||||||
|
|
||||||
today = datetime.date.today()
|
today = datetime.date.today()
|
||||||
|
@ -120,7 +120,7 @@ class MembershipTable(tables.Table):
|
|||||||
club=record.club,
|
club=record.club,
|
||||||
user=record.user,
|
user=record.user,
|
||||||
date_start__gte=record.club.membership_start,
|
date_start__gte=record.club.membership_start,
|
||||||
date_end__lte=record.club.membership_end,
|
date_end__lte=record.club.membership_end or date(9999, 12, 31),
|
||||||
).exists(): # If the renew is not yet performed
|
).exists(): # If the renew is not yet performed
|
||||||
empty_membership = Membership(
|
empty_membership = Membership(
|
||||||
club=record.club,
|
club=record.club,
|
||||||
|
Reference in New Issue
Block a user