From b9aab38185212a3e215db2743a3defa1ad75a17b Mon Sep 17 00:00:00 2001 From: Chris Church Date: Wed, 14 Dec 2016 13:20:08 -0500 Subject: [PATCH] Handle TypeError when lookup is not valid for a given field. --- awx/api/filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/filters.py b/awx/api/filters.py index 5146ff0cd2..6885d73326 100644 --- a/awx/api/filters.py +++ b/awx/api/filters.py @@ -242,7 +242,7 @@ class FieldLookupBackend(BaseFilterBackend): queryset = queryset.filter(q) queryset = queryset.filter(*args).distinct() return queryset - except (FieldError, FieldDoesNotExist, ValueError) as e: + except (FieldError, FieldDoesNotExist, ValueError, TypeError) as e: raise ParseError(e.args[0]) except ValidationError as e: raise ParseError(e.messages)