Fix TypeError

This commit is contained in:
Raphael Michel
2017-11-07 18:18:57 +01:00
parent f3221e6e76
commit f5958a7ff2

View File

@@ -150,7 +150,7 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
sender=sender,
event=event.id if event else None,
headers=headers,
invoices=[i.pk for i in invoices]
invoices=[i.pk for i in invoices] if invoices else []
)
if invoices: