diff options
Diffstat (limited to 'django/forms/widgets.py')
| -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 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: |
