Made Query.check_filterable() use bool by default instead of str.

This commit is contained in:
Alex Aktsipetrov 2019-12-05 19:46:59 +03:00 committed by Mariusz Felisiak
parent bf12273db4
commit 723fc7fcf6
1 changed files with 1 additions and 1 deletions

View File

@ -1114,7 +1114,7 @@ class Query(BaseExpression):
def check_filterable(self, expression): def check_filterable(self, expression):
"""Raise an error if expression cannot be used in a WHERE clause.""" """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( raise NotSupportedError(
expression.__class__.__name__ + ' is disallowed in the filter ' expression.__class__.__name__ + ' is disallowed in the filter '
'clause.' 'clause.'