forked from CGM_Public/pretix_original
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:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
else:
|
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")):
|
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
|
return None
|
||||||
@@ -474,7 +474,7 @@ def variables_from_questions(sender, *args, **kwargs):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
a = op.answers.filter(question_id=question_id).first()
|
a = op.answers.filter(question_id=question_id).first() or a
|
||||||
|
|
||||||
if not a:
|
if not a:
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Reference in New Issue
Block a user