[1.11.x] Refs #27866 -- Adapted backport for Python 2 compatibility

This commit is contained in:
Claude Paroz 2017-04-01 12:29:34 +02:00
parent 06d32f689e
commit 523a8032c8
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,7 @@ class ChoiceWidget(Widget):
"""Return selected values as a list."""
if not isinstance(value, (tuple, list)):
value = [value]
return [str(v) if v is not None else '' for v in value]
return [force_text(v) if v is not None else '' for v in value]
class Select(ChoiceWidget):