mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Devices: Fix crash in form validation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user