From f296f262e615978f959c27259f59eca2673c747d Mon Sep 17 00:00:00 2001 From: Martin Gross Date: Mon, 23 Sep 2019 11:12:50 +0200 Subject: [PATCH] Properly indent handling for non-addons --- src/pretix/base/pdf.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pretix/base/pdf.py b/src/pretix/base/pdf.py index c557a03b8..5d27cda4d 100644 --- a/src/pretix/base/pdf.py +++ b/src/pretix/base/pdf.py @@ -276,13 +276,13 @@ def variables_from_questions(sender, *args, **kwargs): else: a = op.addon_to.answers.filter(question_id=question_id).first() - if 'answers' in getattr(op, '_prefetched_objects_cache', {}): - try: - a = [a for a in op.answers.all() if a.question_id == question_id][0] - except IndexError: - pass - else: - a = op.answers.filter(question_id=question_id).first() + if 'answers' in getattr(op, '_prefetched_objects_cache', {}): + try: + a = [a for a in op.answers.all() if a.question_id == question_id][0] + except IndexError: + pass + else: + a = op.answers.filter(question_id=question_id).first() if not a: return ""