From abfd8a7d861c4e09af0d59c94dab81e4a05d80d4 Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Tue, 17 Oct 2023 13:40:50 +0200 Subject: [PATCH] Check-in list export: Fall back to invoice address (Z#23133171) (#3650) --- src/pretix/plugins/checkinlists/exporters.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/pretix/plugins/checkinlists/exporters.py b/src/pretix/plugins/checkinlists/exporters.py index 9d19af55f..adff929cc 100644 --- a/src/pretix/plugins/checkinlists/exporters.py +++ b/src/pretix/plugins/checkinlists/exporters.py @@ -628,11 +628,17 @@ class CSVCheckinList(CheckInListMixin, ListExporter): _('Yes') if op.blocked else '', date_format(op.valid_from, 'SHORT_DATETIME_FORMAT') if op.valid_from else '', date_format(op.valid_until, 'SHORT_DATETIME_FORMAT') if op.valid_until else '', - op.street or '', - op.zipcode or '', - op.city or '', - op.country if op.country else '', - op.state or '', + ] + if (op.street or op.zipcode or op.city): + address = op + else: + address = ia + row += [ + address.street or '', + address.zipcode or '', + address.city or '', + address.country if address.country else '', + address.state or '', ] yield row