1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

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

View File

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