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:
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
Block a user