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.'