Skip to content
Snippets Groups Projects
Commit c0a378ba authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Keeping only responsible parties for which appliesTo='resource'

parent 2d3eeef2
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,10 @@ def process_records( in_records, geonetwork_root_url, working_directory, credent
# we transform some lists into list of dictionaries...
if 'responsibleParty' in out_record['metadata-fr'].keys():
del out_record['metadata-fr']['responsibleParty']
out_record['metadata-fr']['responsibleParty'] = list_to_dictlist(in_record['responsibleParty'], 'responsibleParty')
tmp = list_to_dictlist(in_record['responsibleParty'], 'responsibleParty')
# remove the entry for which appliesTo = 'metadata'
out_record['metadata-fr']['responsibleParty'] = [x for x in tmp if x['appliesTo'] == 'resource']
if 'link' in out_record['metadata-fr'].keys():
#logging.debug(in_record['link'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment