mirror of
https://github.com/pretix/pretix.git
synced 2026-05-19 17:34:03 +00:00
Prevent a KeyError during form validation
This commit is contained in:
@@ -417,6 +417,7 @@ class ItemAddOnsFormSet(I18nFormSet):
|
|||||||
pass
|
pass
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if 'addon_category' in form.cleaned_data:
|
||||||
if form.cleaned_data['addon_category'].pk in categories:
|
if form.cleaned_data['addon_category'].pk in categories:
|
||||||
raise ValidationError(_('You added the same add-on category twice'))
|
raise ValidationError(_('You added the same add-on category twice'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user