Commit 1ac63cbe authored by Benjamin Graillot's avatar Benjamin Graillot

[member] Handle unlimited memberships

parent d826dc9d
Pipeline #1488 passed with stage
in 2 minutes and 52 seconds
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment