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

This commit is contained in:
Tom Christie 2014-11-18 15:42:52 +00:00
parent 080bd3d24e
commit c0d356edaa

View File

@ -121,7 +121,10 @@ class SimpleMetadata(BaseMetadata):
if hasattr(field, '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()
]