Commit 59e1c31d authored by Patrik Dufresne's avatar Patrik Dufresne

ldap_membership: Add verification about "line.date_to".

parent 48b535f2
......@@ -302,7 +302,8 @@ class ResPartner(models.Model):
# TODO Pick the date only if PAID. Otherwise, pick Date_From + 60 jours.
end_dates = [time.mktime(time.strptime(line.date_to, '%Y-%m-%d'))
for line in self.member_lines
if line.state in ACTIVE_STATES]
if line.state in ACTIVE_STATES
if line.date_to]
if end_dates:
expire_date = max(end_dates)
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