Voucher bulk creation: Fix validation issue

This commit is contained in:
Raphael Michel
2023-08-23 12:18:30 +02:00
parent b56bd8541e
commit f017de1a21

View File

@@ -340,6 +340,9 @@ class VoucherBulkForm(VoucherForm):
def clean_send_recipients(self):
raw = self.cleaned_data['send_recipients']
if self.cleaned_data.get('send', None) is False:
# No need to validate addresses if the section was turned off
return []
if not raw:
return []
r = raw.split('\n')