Skip to content

Commit

Permalink
revert getting associations
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Jun 11, 2024
1 parent 993cc22 commit dee4d73
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/get_associations.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ def get_associations(token, env):

service_concept_id = cmr.queries.ServiceQuery(mode=mode).provider('POCLOUD').name('PODAAC L2 Cloud Subsetter').get()[0].get('concept_id')
url = cmr.queries.CollectionQuery(mode=mode).service_concept_id(service_concept_id).provider('POCLOUD')._build_url()
print(url)
collections_query = requests.get(url, headers=headers, params={'page_size': 2000}).json()
print(collections_query)
results = collections_query['feed']['entry']
collections = [a.get('id') for a in results]
collections_query = requests.get(url, headers=headers, params={'page_size': 2000}).json()['feed']['entry']
collections = [a.get('id') for a in collections_query]

filename = f"{env}_associations.json"
with open(filename, 'w') as file:
Expand Down

0 comments on commit dee4d73

Please sign in to comment.