aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-12-15 12:48:13 -0800
committerBryan Newbold <bnewbold@robocracy.org>2021-12-15 12:48:15 -0800
commitb9d5c3853fe70663b0eff101c9ac4a1cbfd354e7 (patch)
treead67a299366abcc5f484385be66a4d79ccc58f25 /python
parent07b9dfe28b4732f0ca52dc4fd571ea238d953279 (diff)
downloadfatcat-b9d5c3853fe70663b0eff101c9ac4a1cbfd354e7.tar.gz
fatcat-b9d5c3853fe70663b0eff101c9ac4a1cbfd354e7.zip
crossref importer: skip affiliations lacking 'name'
Relatedly, we should start handling ROR affiliations in contribs soon.
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_tools/importers/crossref.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/fatcat_tools/importers/crossref.py b/python/fatcat_tools/importers/crossref.py
index 52bd7465..9150322b 100644
--- a/python/fatcat_tools/importers/crossref.py
+++ b/python/fatcat_tools/importers/crossref.py
@@ -137,6 +137,9 @@ class CrossrefImporter(EntityImporter):
index = None
raw_affiliation = None
affiliation_list = am.get("affiliation") or []
+ # TODO: currently requiring a "name" in all affiliations. Could
+ # add ROR support (via identifier) in the near future
+ affiliation_list = [a for a in affiliation_list if "name" in a]
if affiliation_list and len(affiliation_list) > 0:
raw_affiliation = affiliation_list[0]["name"]
if len(affiliation_list) > 1: