summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2020-07-11 00:27:49 +0000
committerbnewbold <bnewbold@archive.org>2020-07-11 00:27:49 +0000
commit26b455ffad566bef58684a78654a2719c409588a (patch)
tree3e58d4430006d7c4de4aa80a1410b9e9d1649f52
parentc9d8550be4bab808c2bad0b0d3642a71075202c0 (diff)
parent3e5056b02b22d9df43db0d95ecd770a360dcd357 (diff)
downloadfatcat-26b455ffad566bef58684a78654a2719c409588a.tar.gz
fatcat-26b455ffad566bef58684a78654a2719c409588a.zip
Merge branch 'martin-datacite-bugfix-sentry-44035' into 'master'
datacite: mitigate sentry #44035 See merge request webgroup/fatcat!66
-rw-r--r--python/fatcat_tools/importers/datacite.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py
index f005f988..785107ee 100644
--- a/python/fatcat_tools/importers/datacite.py
+++ b/python/fatcat_tools/importers/datacite.py
@@ -732,6 +732,10 @@ class DataciteImporter(EntityImporter):
if nameType in ('', 'Personal'):
creator_id = None
for nid in c.get('nameIdentifiers', []) or []:
+ if not isinstance(nid, dict):
+ # see: fatcat-workers/issues/44035/
+ print('unexpected nameIdentifiers, expected list of dicts, got: {}'.format(nid), file=sys.stderr)
+ continue
name_scheme = nid.get('nameIdentifierScheme', '') or ''
if not name_scheme.lower() == "orcid":
continue