aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/orcid.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-29 17:51:34 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-29 17:51:34 -0800
commitbf7725c00749e3560fa59711a02c229fa9b228d4 (patch)
tree40f16e7b23010ac50f8df558898f2b5d0605e6c8 /python/fatcat_tools/importers/orcid.py
parent3508fc4a78769eb6d118cd71805b96bc08856111 (diff)
downloadfatcat-bf7725c00749e3560fa59711a02c229fa9b228d4.tar.gz
fatcat-bf7725c00749e3560fa59711a02c229fa9b228d4.zip
yet another required field bug
Diffstat (limited to 'python/fatcat_tools/importers/orcid.py')
-rw-r--r--python/fatcat_tools/importers/orcid.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/fatcat_tools/importers/orcid.py b/python/fatcat_tools/importers/orcid.py
index d54b5122..928b9627 100644
--- a/python/fatcat_tools/importers/orcid.py
+++ b/python/fatcat_tools/importers/orcid.py
@@ -56,18 +56,19 @@ class OrcidImporter(EntityImporter):
display = sur
elif given:
display = given
- if not display:
- # must have *some* name
- return None
orcid = obj['orcid-identifier']['path']
if not self.is_orcid(orcid):
sys.stderr.write("Bad ORCID: {}\n".format(orcid))
return None
+ display = clean(display)
+ if not display:
+ # must have *some* name
+ return None
ce = fatcat_client.CreatorEntity(
orcid=orcid,
given_name=clean(given),
surname=clean(sur),
- display_name=clean(display),
+ display_name=display,
extra=extra)
return ce