mirror of https://github.com/django/django.git
Made Query.check_filterable() use bool by default instead of str.
This commit is contained in:
parent
bf12273db4
commit
723fc7fcf6
|
@ -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.'
|
||||
|
|
Loading…
Reference in New Issue