summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-01-31 06:41:51 -0800
committerTim Graham <timograham@gmail.com>2017-01-31 09:43:31 -0500
commit52e9c1c8b72bc30a66d838187bd9ecb1f22f8448 (patch)
tree0a67f6c3b1f85902ef075863a7a0a186d59c7d71 /django/forms
parente2b19e70c7df99b3dc00c174741d01c2977aef00 (diff)
[1.11.x] Fixed #27758 -- Reallowed AdvancedModelIterator pattern after template widget rendering.
Backport of 6d8979f4c2fbfb9fd5db92acd72489cbbcbdd5d1 from master
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/widgets.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index f50ddd52ba..594b578431 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -569,8 +569,6 @@ class ChoiceWidget(Widget):
for option_value, option_label in chain(self.choices):
if option_value is None:
option_value = ''
- else:
- option_value = force_text(option_value)
if isinstance(option_label, (list, tuple)):
index = groups[-1][2] + 1
@@ -586,7 +584,7 @@ class ChoiceWidget(Widget):
for subvalue, sublabel in choices:
selected = (
- subvalue in value and
+ force_text(subvalue) in value and
(has_selected is False or self.allow_multiple_selected)
)
if selected is True and has_selected is False: