diff options
| author | Bryan Newbold <bnewbold@robocracy.org> | 2021-12-15 12:48:13 -0800 | 
|---|---|---|
| committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-12-15 12:48:15 -0800 | 
| commit | b9d5c3853fe70663b0eff101c9ac4a1cbfd354e7 (patch) | |
| tree | ad67a299366abcc5f484385be66a4d79ccc58f25 /python/fatcat_tools | |
| parent | 07b9dfe28b4732f0ca52dc4fd571ea238d953279 (diff) | |
| download | fatcat-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/fatcat_tools')
| -rw-r--r-- | python/fatcat_tools/importers/crossref.py | 3 | 
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: | 
