Only mention an order in the mail if one is associated (#592)

This commit is contained in:
Tobias Kunze
2017-08-09 10:42:52 +02:00
committed by Raphael Michel
parent 349e306d38
commit a213ca746c

View File

@@ -116,10 +116,10 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
body_plain += signature
body_plain += "\r\n\r\n-- \r\n"
body_plain += _(
"You are receiving this email because you placed an order for {event}."
).format(event=event.name)
if order:
body_plain += _(
"You are receiving this email because you placed an order for {event}."
).format(event=event.name)
htmlctx['order'] = order
body_plain += "\r\n"
body_plain += _(