From 02f5298be0da677e52621e7e6be682e07b9fce7e Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Tue, 31 Dec 2019 14:23:51 +0100 Subject: datacite: ensure name schema is defined --- python/fatcat_tools/importers/datacite.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/fatcat_tools') diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py index f65482e7..f8080c10 100644 --- a/python/fatcat_tools/importers/datacite.py +++ b/python/fatcat_tools/importers/datacite.py @@ -291,7 +291,8 @@ class DataciteImporter(EntityImporter): if nameType == 'Personal' or nameType == '': creator_id = None for nid in c.get('nameIdentifiers', []): - if not nid.get('nameIdentifierScheme').lower() == "orcid": + name_scheme = nid.get('nameIdentifierScheme', '') or '' + if not name_scheme.lower() == "orcid": continue orcid = nid.get('nameIdentifier', '').replace('https://orcid.org/', '') -- cgit v1.2.3