family: fix empty or null pay_limit_date export (#45714)

This commit is contained in:
Thomas NOËL 2020-08-03 23:52:46 +02:00 committed by Thomas NOEL
parent 5e71e9d4b1
commit 91b97130b6
2 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ def format_invoice(i):
'no_online_payment_reason': i.no_online_payment_reason,
'has_pdf': i.has_pdf,
}
if now().date() > i.pay_limit_date:
if i.pay_limit_date and now().date() > i.pay_limit_date:
invoice['online_payment'] = False
invoice['no_online_payment_reason'] = 'past-due-date'
return invoice

Binary file not shown.