Fix crash when de-selecting all languages

This commit is contained in:
Raphael Michel
2019-08-26 16:44:20 +02:00
parent ebf411b7a0
commit 83dd865b78

View File

@@ -534,7 +534,7 @@ class EventSettingsForm(SettingsForm):
def clean(self):
data = super().clean()
if data['locale'] not in data['locales']:
if 'locales' in data and data['locale'] not in data['locales']:
raise ValidationError({
'locale': _('Your default locale must also be enabled for your event (see box above).')
})