diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/fatcat_tools/importers/datacite.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py index fb945ba6..f681b51b 100644 --- a/python/fatcat_tools/importers/datacite.py +++ b/python/fatcat_tools/importers/datacite.py @@ -307,13 +307,19 @@ class DataciteImporter(EntityImporter): if surname: surname = clean(surname) + if not name: + continue + + if raw_affiliation is not None and not raw_affiliation: + continue + contribs.append( fatcat_openapi_client.ReleaseContrib( creator_id=creator_id, index=i, - raw_name=c.get('name'), - given_name=c.get('givenName'), - surname=c.get('familyName'), + raw_name=name, + given_name=given_name, + surname=surname, role='author', raw_affiliation=raw_affiliation, )) |