Skip to content
Snippets Groups Projects
Commit 3b1177ef authored by Dan Braghis's avatar Dan Braghis
Browse files

Fix category block default label

parent 07b05d2d
No related branches found
No related tags found
No related merge requests found
...@@ -42,9 +42,11 @@ class CategoryQuestionBlock(FormFieldBlock): ...@@ -42,9 +42,11 @@ class CategoryQuestionBlock(FormFieldBlock):
return forms.ChoiceField return forms.ChoiceField
def use_defaults_from_category(self, kwargs, category): def use_defaults_from_category(self, kwargs, category):
map = {'field_label': 'label', 'help_text': 'help_text'}
for field in ['field_label', 'help_text']: for field in ['field_label', 'help_text']:
if not kwargs[field]: if field not in kwargs:
kwargs[field] = getattr(category, field) kwargs[map[field]] = getattr(category, field)
return kwargs return kwargs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment