Skip to content
Snippets Groups Projects
Unverified Commit 16f0a189 authored by Dan Braghis's avatar Dan Braghis Committed by GitHub
Browse files

Merge pull request #23 from OpenTechFund/post-restructure-tweaks

Fund category block and template tweaks
parents 07b05d2d 8ab42264
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