From 0875d728e88f087fcb7e48232f4a0283ddaed1ee Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 7 Jun 2018 14:28:52 +0200 Subject: [PATCH] Fix PDF renderer without invoice address --- src/pretix/base/pdf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretix/base/pdf.py b/src/pretix/base/pdf.py index babc379427..26364d3708 100644 --- a/src/pretix/base/pdf.py +++ b/src/pretix/base/pdf.py @@ -148,12 +148,12 @@ DEFAULT_VARIABLES = OrderedDict(( ("invoice_name", { "label": _("Invoice address: name"), "editor_sample": _("John Doe"), - "evaluate": lambda op, order, ev: order.invoice_address.name if getattr(order, 'invoice_address') else '' + "evaluate": lambda op, order, ev: order.invoice_address.name if getattr(order, 'invoice_address', None) else '' }), ("invoice_company", { "label": _("Invoice address: company"), "editor_sample": _("Sample company"), - "evaluate": lambda op, order, ev: order.invoice_address.company if getattr(order, 'invoice_address') else '' + "evaluate": lambda op, order, ev: order.invoice_address.company if getattr(order, 'invoice_address', None) else '' }), ("addons", { "label": _("List of Add-Ons"),