Commit c0d356ed by Tom Christie

Fix byte decode error rendering 'display_name' with OPTIONS. Closes #2084

parent 080bd3d2
...@@ -121,7 +121,10 @@ class SimpleMetadata(BaseMetadata): ...@@ -121,7 +121,10 @@ class SimpleMetadata(BaseMetadata):
if hasattr(field, 'choices'): if hasattr(field, 'choices'):
field_info['choices'] = [ field_info['choices'] = [
{'value': choice_value, 'display_name': choice_name} {
'value': choice_value,
'display_name': force_text(choice_name, strings_only=True)
}
for choice_value, choice_name in field.choices.items() for choice_value, choice_name in field.choices.items()
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment