Skip to content

Commit

Permalink
fix: raise FilterError when where filter input is not object #309
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Feb 8, 2022
1 parent 786eb1a commit 1357c91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions datagateway_api/src/search_api/query_filter_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ def get_where_filter(where_filter_input, entity_name):
:return: The list of `NestedWhereFilters` and/ or `SearchAPIWhereFilter` objects
created
"""
if not isinstance(where_filter_input, dict):
raise FilterError(
"Bad where filter input, please ensure that it is provided as an "
"object",
)

where_filters = []
if where_filter_input:
Expand Down

0 comments on commit 1357c91

Please sign in to comment.