forked from CGM_Public/pretix_original
Fix issue in OrderListExporter when mixing subevents with non-subevents
This commit is contained in:
@@ -430,12 +430,17 @@ class OrderListExporter(MultiSheetListExporter):
|
|||||||
order.datetime.astimezone(tz).strftime('%Y-%m-%d'),
|
order.datetime.astimezone(tz).strftime('%Y-%m-%d'),
|
||||||
]
|
]
|
||||||
if has_subevents:
|
if has_subevents:
|
||||||
row.append(op.subevent.name)
|
if op.subevent:
|
||||||
row.append(op.subevent.date_from.astimezone(self.event_object_cache[order.event_id].timezone).strftime('%Y-%m-%d %H:%M:%S'))
|
row.append(op.subevent.name)
|
||||||
if op.subevent.date_to:
|
row.append(op.subevent.date_from.astimezone(self.event_object_cache[order.event_id].timezone).strftime('%Y-%m-%d %H:%M:%S'))
|
||||||
row.append(op.subevent.date_to.astimezone(self.event_object_cache[order.event_id].timezone).strftime('%Y-%m-%d %H:%M:%S'))
|
if op.subevent.date_to:
|
||||||
|
row.append(op.subevent.date_to.astimezone(self.event_object_cache[order.event_id].timezone).strftime('%Y-%m-%d %H:%M:%S'))
|
||||||
|
else:
|
||||||
|
row.append('')
|
||||||
else:
|
else:
|
||||||
row.append('')
|
row.append('')
|
||||||
|
row.append('')
|
||||||
|
row.append('')
|
||||||
row += [
|
row += [
|
||||||
str(op.item),
|
str(op.item),
|
||||||
str(op.variation) if op.variation else '',
|
str(op.variation) if op.variation else '',
|
||||||
|
|||||||
Reference in New Issue
Block a user