mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Handle TypeError when lookup is not valid for a given field.
This commit is contained in:
parent
f95f75c55a
commit
b9aab38185
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user