Skip to content

Commit

Permalink
fixes idref and orcid from aurehal
Browse files Browse the repository at this point in the history
  • Loading branch information
ericjeangirard committed Jun 5, 2024
1 parent ffeaaa2 commit 7d2a867
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions project/server/main/aurehal.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ def parse_author(elt, hal_idref):
if isinstance(elt.get('emailDomain_s'), str):
author['email_domain'] = elt.get('emailDomain_s').strip()

if isinstance(elt.get('idrefId_s'), str):
author['idref'] = elt.get('idrefId_s').strip().split('/')[-1]
if isinstance(elt.get('idrefId_s'), list) and len(elt.get('idrefId_s')) > 0:
author['idref'] = elt.get('idrefId_s')[0].strip().split('/')[-1]

if isinstance(elt.get('orcidId_s'), str):
author['orcid'] = elt.get('orcidId_s').strip().split('/')[-1]
if isinstance(elt.get('orcidId_s'), list) and len(elt.get('orcidId_s')) > 0:
author['orcid'] = elt.get('orcidId_s')[0].strip().split('/')[-1]

return author

Expand Down

0 comments on commit 7d2a867

Please sign in to comment.