diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2017-01-31 06:41:51 -0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-01-31 09:41:51 -0500 |
| commit | 6d8979f4c2fbfb9fd5db92acd72489cbbcbdd5d1 (patch) | |
| tree | 3f372d8c32e3a0396536783ae920399ca5859f2e /django | |
| parent | 3b2e28fc85c26dc50d4cc16b7c586f7f0994f752 (diff) | |
Fixed #27758 -- Reallowed AdvancedModelIterator pattern after template widget rendering.
Diffstat (limited to 'django')
| -rw-r--r-- | django/forms/widgets.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index eef90a3bd4..c32653a245 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -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: |
