1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #27758 -- Reallowed AdvancedModelIterator pattern after template widget rendering.

This commit is contained in:
Jon Dufresne
2017-01-31 06:41:51 -08:00
committed by Tim Graham
parent 3b2e28fc85
commit 6d8979f4c2
2 changed files with 38 additions and 3 deletions

View File

@@ -552,8 +552,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
@@ -569,7 +567,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: