mirror of
https://github.com/django/django.git
synced 2025-04-22 00:04:43 +00:00
[1.11.x] Refs #27866 -- Adapted backport for Python 2 compatibility
This commit is contained in:
parent
06d32f689e
commit
523a8032c8
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user