Skip to content

Commit

Permalink
Merge pull request #12 from Pearson-Advance/pearson/PADV-735
Browse files Browse the repository at this point in the history
PADV-735 - Allow catalogue query values to be send as query params.
  • Loading branch information
Squirrel18 authored Oct 27, 2023
2 parents da9af88 + 496036d commit 363bb96
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 363bb96

Please sign in to comment.