From 690725967083bbdace7797579c343538ad6053db Mon Sep 17 00:00:00 2001 From: Mees Fix Date: Mon, 13 Nov 2023 14:46:47 -0500 Subject: [PATCH 1/2] update filters key value pair in params for get proposals by category --- jwql/website/apps/jwql/data_containers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jwql/website/apps/jwql/data_containers.py b/jwql/website/apps/jwql/data_containers.py index f4ecb6aa7..95b4a41be 100644 --- a/jwql/website/apps/jwql/data_containers.py +++ b/jwql/website/apps/jwql/data_containers.py @@ -1396,7 +1396,7 @@ def get_proposals_by_category(instrument): service = "Mast.Jwst.Filtered.{}".format(instrument) params = {"columns": "program, category", - "filters": []} + "filters": [{'paramName':'instrume', 'values':[instrument]}]} response = Mast.service_request_async(service, params) results = response[0].json()['data'] From c5b286e97748699c8d2f7f60cf3b753894c89ae0 Mon Sep 17 00:00:00 2001 From: Mees Fix Date: Mon, 13 Nov 2023 15:17:53 -0500 Subject: [PATCH 2/2] Updating filters key in params for test_astroquery_mast --- jwql/tests/test_mast_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jwql/tests/test_mast_utils.py b/jwql/tests/test_mast_utils.py index 6267be9bc..74c3f0328 100755 --- a/jwql/tests/test_mast_utils.py +++ b/jwql/tests/test_mast_utils.py @@ -34,8 +34,10 @@ def test_astroquery_mast(): """Test if the astroquery.mast service can complete a request""" service = 'Mast.Caom.Filtered' - params = {'columns': 'COUNT_BIG(*)', 'filters': [], 'pagesize': 1, - 'page': 1} + params = {'columns': 'COUNT_BIG(*)', + 'filters': [{"paramName": "obs_collection", + "values": ["JWST"]},], + 'pagesize': 1, 'page': 1} response = Mast.service_request_async(service, params) result = response[0].json()