From 9e2e11902245edd79e7110f4bd4c0362dd269cb7 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Tue, 21 Feb 2017 21:29:37 -0500 Subject: [PATCH] Make polymorphic_ctype aliasing work in filters Previousy this would fall through and get caught by the type checker --- awx/api/filters.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/awx/api/filters.py b/awx/api/filters.py index 9f34723d48..f4c61b64c8 100644 --- a/awx/api/filters.py +++ b/awx/api/filters.py @@ -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 = []