Skip to content

Commit

Permalink
fix: allow to send key values as query params.
Browse files Browse the repository at this point in the history
  • Loading branch information
Squirrel18 committed Oct 27, 2023
1 parent da9af88 commit 496036d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions enterprise/api_client/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ def get_catalog_results_from_discovery(self, content_filter_query, query_params=
Return results from the discovery service's search/all endpoint.
"""
api_url = self.get_api_url(self.SEARCH_ALL_ENDPOINT)

# This change allows the key list to be sent as query parameters.
# This is a temporary change to support catalogues with specific courses.
if content_filter_query.get('key'):
query_params['key'] = content_filter_query.get('key')

response = self.client.post(api_url, data=content_filter_query, params=query_params)
response.raise_for_status()
response = response.json()
Expand Down

0 comments on commit 496036d

Please sign in to comment.