diff --git a/viringo/catalogs.py b/viringo/catalogs.py index 6d21d93..6ea74eb 100644 --- a/viringo/catalogs.py +++ b/viringo/catalogs.py @@ -117,6 +117,7 @@ def listRecords( provider_id, client_id = set_to_provider_client(set) results, total_records, paging_cursor = datacite.get_metadata_list( query=search_query, + provider_id=provider_id, client_id=client_id, from_datetime=from_, until_datetime=until, @@ -159,6 +160,7 @@ def listIdentifiers( provider_id, client_id = set_to_provider_client(set) results, total_records, paging_cursor = datacite.get_metadata_list( + provider_id=provider_id, client_id=client_id, from_datetime=from_, until_datetime=until, diff --git a/viringo/services/datacite.py b/viringo/services/datacite.py index 1719a2e..e33914f 100644 --- a/viringo/services/datacite.py +++ b/viringo/services/datacite.py @@ -237,12 +237,17 @@ def get_metadata_list( params = { 'detail': True, - 'provider_id': provider_id, - 'client_id': client_id, 'page[size]': config.RESULT_SET_SIZE, 'page[cursor]': cursor } + # Only use the provider id if we dont have a client id + # Otherwise just send client_id + if not client_id: + params['provider_id'] = provider_id + else: + params['client_id'] = client_id + if datetime_query: if query: query = query + " AND " + datetime_query