mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Fix ConstanceForm validation
Account for cases where CONSTANCE_CONFIG_FIELDSETS is not set at all in ConstanceForm validation.
This commit is contained in:
parent
15d2cba34f
commit
b37b73bf0e
1 changed files with 1 additions and 1 deletions
|
|
@ -166,7 +166,7 @@ class ConstanceForm(forms.Form):
|
|||
for fieldset_title, fields_list in settings.CONFIG_FIELDSETS.items():
|
||||
for field_name in fields_list:
|
||||
field_name_list.append(field_name)
|
||||
if set(set(settings.CONFIG.keys()) - set(field_name_list)):
|
||||
if field_name_list and set(set(settings.CONFIG.keys()) - set(field_name_list)):
|
||||
raise forms.ValidationError(_('CONSTANCE_CONFIG_FIELDSETS does not contain '
|
||||
'fields that exist in CONSTANCE_CONFIG.'))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue