Skip to content
Snippets Groups Projects
Commit fb74afc7 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Ensure that the category correctly renders it's options

parent cfa2b6db
No related branches found
No related tags found
No related merge requests found
...@@ -66,3 +66,9 @@ class CategoryQuestionBlock(OptionalFormFieldBlock): ...@@ -66,3 +66,9 @@ class CategoryQuestionBlock(OptionalFormFieldBlock):
return forms.CheckboxSelectMultiple return forms.CheckboxSelectMultiple
else: else:
return forms.RadioSelect return forms.RadioSelect
def render(self, value, context):
data = context['data']
category = value['category']
context['data'] = category.options.filter(id__in=data).values_list('value', flat=True)
return super().render(value, context)
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