From 6988a5aa5d6dfa71fd4b90a73b050864e8530955 Mon Sep 17 00:00:00 2001 From: Viktor Bozhinov Date: Fri, 4 Feb 2022 11:12:42 +0000 Subject: [PATCH] fix: make WHERE filter without operator work with int and bool #322 --- datagateway_api/src/search_api/query_filter_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datagateway_api/src/search_api/query_filter_factory.py b/datagateway_api/src/search_api/query_filter_factory.py index 79a558ad..1789bcab 100644 --- a/datagateway_api/src/search_api/query_filter_factory.py +++ b/datagateway_api/src/search_api/query_filter_factory.py @@ -277,7 +277,7 @@ def get_condition_values(conditions_dict): field = list(conditions_dict.keys())[0] filter_data = list(conditions_dict.values())[0] - if isinstance(filter_data, str): + if isinstance(filter_data, (bool, int, str)): # Format: {"where": {"property": "value"}} log.debug("Format of WHERE filter: {'where': {'property': 'value'}}") value = conditions_dict[field]