summaryrefslogtreecommitdiff
path: root/django/forms/widgets.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-12-07 17:13:07 -0500
committerGitHub <noreply@github.com>2017-12-07 17:13:07 -0500
commit2b81faab257832d3dbd42947a884f7ec99685d18 (patch)
treef6fbaefb4284567bcd0a0e2a27a6ce36938aaef3 /django/forms/widgets.py
parent02d9419fe34eaa4d41d8a8df93373f286a36a2ae (diff)
Fixed #28906 -- Removed unnecessary bool() calls.
Diffstat (limited to 'django/forms/widgets.py')
-rw-r--r--django/forms/widgets.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 498185fe23..c758b36e91 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -681,7 +681,7 @@ class Select(ChoiceWidget):
def _choice_has_empty_value(choice):
"""Return True if the choice's value is empty string or None."""
value, _ = choice
- return (isinstance(value, str) and not bool(value)) or value is None
+ return (isinstance(value, str) and not value) or value is None
def use_required_attribute(self, initial):
"""