From 723fc7fcf63cbb3c3267ec15ce197d45a7203c4d Mon Sep 17 00:00:00 2001 From: Alex Aktsipetrov Date: Thu, 5 Dec 2019 19:46:59 +0300 Subject: [PATCH] Made Query.check_filterable() use bool by default instead of str. --- django/db/models/sql/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index af1ea8b84b1..988689485c2 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.'