From ef76b18586a62ef91ce584ea9217a8290692bdaf Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Wed, 30 Sep 2026 13:59:37 +0200 Subject: [PATCH] Fix voucher batch-import handling missing email column in row --- src/pretix/control/forms/vouchers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretix/control/forms/vouchers.py b/src/pretix/control/forms/vouchers.py index aac75b26e..63c710a67 100644 --- a/src/pretix/control/forms/vouchers.py +++ b/src/pretix/control/forms/vouchers.py @@ -615,9 +615,9 @@ class VoucherBulkForm(VoucherForm): raise ValidationError(_('CSV input contains an unknown field with the header "{header}".').format(header=unknown_fields[0])) for i, row in enumerate(reader): try: - EmailValidator()(row['email'].strip()) + EmailValidator()(row.get('email', '').strip()) except ValidationError as err: - raise ValidationError(_('{value} is not a valid email address.').format(value=row['email'].strip())) from err + raise ValidationError(_('{value} in line {line} is not a valid email address.').format(line=i, value=row.get('email', '').strip())) from err try: res.append(self.Recipient( name=row.get('name', ''),