From 79fe589c4ed18114286fa7dd1ad0e6990a0d2f2a Mon Sep 17 00:00:00 2001 From: Viktor Bozhinov Date: Thu, 23 Feb 2023 13:32:00 +0000 Subject: [PATCH] refactor: remove `str_conditions` param from `get_search` method #398 --- datagateway_api/src/search_api/helpers.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/datagateway_api/src/search_api/helpers.py b/datagateway_api/src/search_api/helpers.py index 898422f6..3fc1b50f 100644 --- a/datagateway_api/src/search_api/helpers.py +++ b/datagateway_api/src/search_api/helpers.py @@ -76,7 +76,7 @@ def create_error_message(e): @client_manager -def get_search(entity_name, filters, str_conditions=None): +def get_search(entity_name, filters): """ Search for data on the given entity, using filters from the request to restrict the query @@ -85,8 +85,6 @@ def get_search(entity_name, filters, str_conditions=None): :type entity_name: :class:`str` :param filters: The list of Search API filters to be applied to the request/query :type filters: List of specific implementation :class:`QueryFilter` - :param str_conditions: Where clause to be applied to the JPQL query - :type str_conditions: :class:`str` :return: List of records (in JSON serialisable format) of the given entity for the query constructed from that and the request's filters """ @@ -99,7 +97,7 @@ def get_search(entity_name, filters, str_conditions=None): if isinstance(filter_, SearchAPIIncludeFilter): entity_relations.extend(filter_.included_filters) - query = SearchAPIQuery(entity_name, str_conditions=str_conditions) + query = SearchAPIQuery(entity_name) filter_handler = FilterOrderHandler() filter_handler.add_filters(filters)