summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Aktsipetrov <alex.akts@gmail.com>2019-12-05 19:46:59 +0300
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-12-06 13:52:36 +0100
commit723fc7fcf63cbb3c3267ec15ce197d45a7203c4d (patch)
treed176729357965e549871ccd38fb30ec01bf932c5
parentbf12273db4e53779546e2ac7b65c0ce8e3c8a640 (diff)
downloaddjango-723fc7fcf63cbb3c3267ec15ce197d45a7203c4d.tar.gz
Made Query.check_filterable() use bool by default instead of str.
-rw-r--r--django/db/models/sql/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index af1ea8b84b..988689485c 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -1114,7 +1114,7 @@ class Query(BaseExpression):
def check_filterable(self, expression):
"""Raise an error if expression cannot be used in a WHERE clause."""
- if not getattr(expression, 'filterable', 'True'):
+ if not getattr(expression, 'filterable', True):
raise NotSupportedError(
expression.__class__.__name__ + ' is disallowed in the filter '
'clause.'