From a213ca746ce819284d6482cab3ab6f38cad77ee6 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Wed, 9 Aug 2017 10:42:52 +0200 Subject: [PATCH] Only mention an order in the mail if one is associated (#592) --- src/pretix/base/services/mail.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pretix/base/services/mail.py b/src/pretix/base/services/mail.py index 8397523174..56bc7036f2 100644 --- a/src/pretix/base/services/mail.py +++ b/src/pretix/base/services/mail.py @@ -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 += _(