summaryrefslogtreecommitdiff
path: root/django/core
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/core
parent02d9419fe34eaa4d41d8a8df93373f286a36a2ae (diff)
Fixed #28906 -- Removed unnecessary bool() calls.
Diffstat (limited to 'django/core')
-rw-r--r--django/core/validators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/validators.py b/django/core/validators.py
index 07236b7d26..15a8beafe2 100644
--- a/django/core/validators.py
+++ b/django/core/validators.py
@@ -54,7 +54,7 @@ class RegexValidator:
Validate that the input contains (or does *not* contain, if
inverse_match is True) a match for the regular expression.
"""
- regex_matches = bool(self.regex.search(str(value)))
+ regex_matches = self.regex.search(str(value))
invalid_input = regex_matches if self.inverse_match else not regex_matches
if invalid_input:
raise ValidationError(self.message, code=self.code)