mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-12-23 07:52:23 +00:00
[member] Handle unlimited memberships
This commit is contained in:
parent
d826dc9d20
commit
1ac63cbed1
@ -146,7 +146,10 @@ class Membership(models.Model):
|
||||
)
|
||||
|
||||
def valid(self):
|
||||
return self.date_start <= datetime.datetime.now() < self.date_end
|
||||
if self.date_end is not None:
|
||||
return self.date_start <= datetime.datetime.now() < self.date_end
|
||||
else:
|
||||
return self.date_start <= datetime.datetime.now()
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('membership')
|
||||
|
Loading…
Reference in New Issue
Block a user