Skip to content

Commit

Permalink
harvester: fix DataCite harvester type extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Jan 8, 2019
1 parent f307f62 commit 671b633
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion asclepias_broker/harvester/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def datacite_metadata(doi: str) -> dict:
result['Identifier'].append({'IDScheme': ai['type'],
'ID': ai['name']})

res_type = metadata['resource_type_general'].lower()
res_type = metadata.get(
'types', {}).get('resourceTypeGeneral', '').lower()
result['Type'] = {
'Name': (res_type if res_type in ('dataset', 'software')
else 'literature')
Expand Down

0 comments on commit 671b633

Please sign in to comment.