Skip to content

Commit

Permalink
refactor: remove str_conditions param from get_search method #398
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Feb 23, 2023
1 parent 52e1343 commit 79fe589
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions datagateway_api/src/search_api/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
"""
Expand All @@ -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)
Expand Down

0 comments on commit 79fe589

Please sign in to comment.