mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
PDF: Fix inheritance of answers to add-on products
This commit is contained in:
@@ -434,7 +434,7 @@ def images_from_questions(sender, *args, **kwargs):
|
||||
except IndexError:
|
||||
pass
|
||||
else:
|
||||
a = op.answers.filter(question_id=question_id).first()
|
||||
a = op.answers.filter(question_id=question_id).first() or a
|
||||
|
||||
if not a or not a.file or not any(a.file.name.lower().endswith(e) for e in (".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tif", ".tiff")):
|
||||
return None
|
||||
@@ -474,7 +474,7 @@ def variables_from_questions(sender, *args, **kwargs):
|
||||
except IndexError:
|
||||
pass
|
||||
else:
|
||||
a = op.answers.filter(question_id=question_id).first()
|
||||
a = op.answers.filter(question_id=question_id).first() or a
|
||||
|
||||
if not a:
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user