From ee9acebe03f29d81492df32459885d4ea1fa211b Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 2 Jun 2023 15:52:56 +0200 Subject: [PATCH] Devices: Fix crash in form validation --- src/pretix/control/forms/organizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/control/forms/organizer.py b/src/pretix/control/forms/organizer.py index a17fea299..8f96e4526 100644 --- a/src/pretix/control/forms/organizer.py +++ b/src/pretix/control/forms/organizer.py @@ -273,7 +273,7 @@ class DeviceForm(forms.ModelForm): def clean(self): d = super().clean() - if not d['all_events'] and not d['limit_events']: + if not d['all_events'] and not d.get('limit_events'): raise ValidationError(_('Your device will not have access to anything, please select some events.')) return d