From 1b82b64a0a2388475bf06adc84cf0b682b5c3227 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 4 Dec 2017 15:48:21 +0100 Subject: [PATCH] PDF ticket output: Fix TypeError on 'content': null --- src/pretix/plugins/ticketoutputpdf/ticketoutput.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py index 025724f3a..c25b76a39 100644 --- a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py +++ b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py @@ -200,6 +200,8 @@ class PdfTicketOutput(BaseTicketOutput): def _get_text_content(self, op: OrderPosition, order: Order, o: dict): ev = op.subevent or order.event + if not o['content']: + return '(error)' if o['content'] == 'other': return o['text'].replace("\n", "
\n") elif o['content'].startswith('meta:'):