Make polymorphic_ctype aliasing work in filters

Previousy this would fall through and get caught by the type checker
This commit is contained in:
Matthew Jones 2017-02-21 21:29:37 -05:00
parent 03d749a630
commit 9e2e119022

View File

@ -143,8 +143,7 @@ class FieldLookupBackend(BaseFilterBackend):
# for polymorphic_ctype__model lookups.
if new_lookup.startswith('polymorphic_ctype__model'):
value = value.replace('_','')
if new_lookup.endswith('__isnull'):
elif new_lookup.endswith('__isnull'):
value = to_python_boolean(value)
elif new_lookup.endswith('__in'):
items = []