forked from CGM_Public/pretix_original
Check-in list export: Default to question answers of parent
This commit is contained in:
@@ -179,7 +179,7 @@ class PDFCheckinList(ReportlabExportMixin, BaseCheckinList):
|
|||||||
).annotate(
|
).annotate(
|
||||||
last_checked_in=Subquery(cqs)
|
last_checked_in=Subquery(cqs)
|
||||||
).select_related('item', 'variation', 'order', 'addon_to', 'order__invoice_address').prefetch_related(
|
).select_related('item', 'variation', 'order', 'addon_to', 'order__invoice_address').prefetch_related(
|
||||||
'answers', 'answers__question'
|
'answers', 'answers__question', 'addon_to__answers', 'addon_to__answers__question'
|
||||||
)
|
)
|
||||||
|
|
||||||
if not cl.all_products:
|
if not cl.all_products:
|
||||||
@@ -221,6 +221,9 @@ class PDFCheckinList(ReportlabExportMixin, BaseCheckinList):
|
|||||||
money_filter(op.price, self.event.currency),
|
money_filter(op.price, self.event.currency),
|
||||||
]
|
]
|
||||||
acache = {}
|
acache = {}
|
||||||
|
if op.addon_to:
|
||||||
|
for a in op.addon_to.answers.all():
|
||||||
|
acache[a.question_id] = str(a)
|
||||||
for a in op.answers.all():
|
for a in op.answers.all():
|
||||||
acache[a.question_id] = str(a)
|
acache[a.question_id] = str(a)
|
||||||
for q in questions:
|
for q in questions:
|
||||||
@@ -278,7 +281,7 @@ class CSVCheckinList(BaseCheckinList):
|
|||||||
).annotate(
|
).annotate(
|
||||||
last_checked_in=Subquery(cqs)
|
last_checked_in=Subquery(cqs)
|
||||||
).prefetch_related(
|
).prefetch_related(
|
||||||
'answers', 'answers__question'
|
'answers', 'answers__question', 'addon_to__answers', 'addon_to__answers__question'
|
||||||
).select_related('order', 'item', 'variation', 'addon_to')
|
).select_related('order', 'item', 'variation', 'addon_to')
|
||||||
|
|
||||||
if not cl.all_products:
|
if not cl.all_products:
|
||||||
@@ -338,6 +341,9 @@ class CSVCheckinList(BaseCheckinList):
|
|||||||
if self.event.has_subevents:
|
if self.event.has_subevents:
|
||||||
row.append(str(op.subevent))
|
row.append(str(op.subevent))
|
||||||
acache = {}
|
acache = {}
|
||||||
|
if op.addon_to:
|
||||||
|
for a in op.addon_to.answers.all():
|
||||||
|
acache[a.question_id] = str(a)
|
||||||
for a in op.answers.all():
|
for a in op.answers.all():
|
||||||
acache[a.question_id] = str(a)
|
acache[a.question_id] = str(a)
|
||||||
for q in questions:
|
for q in questions:
|
||||||
|
|||||||
Reference in New Issue
Block a user