add empty string / none to choices for single LocationGroupCategories

This commit is contained in:
Laura Klünder 2017-07-11 18:04:22 +02:00
parent ca237d7884
commit 662031c632

View file

@ -52,6 +52,7 @@ class EditorFormBase(ModelForm):
if category.single:
name = 'group_'+category.name
initial = initial[0] if initial else ''
choices = (('', '---'), )+choices
field = ChoiceField(label=category.title, required=False, initial=initial, choices=choices)
else:
name = 'groups_'+category.name