diff options
| author | bnewbold <bnewbold@archive.org> | 2021-04-02 21:17:37 +0000 | 
|---|---|---|
| committer | bnewbold <bnewbold@archive.org> | 2021-04-02 21:17:37 +0000 | 
| commit | 88bb447aadef9db5dba02397f44bfdb667298187 (patch) | |
| tree | 80dff653ef595c57b63cd7e91e7a4918461264f1 | |
| parent | f8a34492e7e1cfd5f55517e1344820e671194ee0 (diff) | |
| parent | 657f7e93b0923b7be3612ff03998e5280d688f51 (diff) | |
| download | fatcat-88bb447aadef9db5dba02397f44bfdb667298187.tar.gz fatcat-88bb447aadef9db5dba02397f44bfdb667298187.zip | |
Merge branch 'martin-datacite-release-contrib-err-sentry-77700' into 'master'
datacite: a missing surname should be None, not the empty string
See merge request webgroup/fatcat!102
| -rw-r--r-- | python/fatcat_tools/importers/datacite.py | 3 | ||||
| -rw-r--r-- | python/tests/files/datacite/datacite_result_33.json | 1 | ||||
| -rw-r--r-- | python/tests/files/datacite/datacite_result_34.json | 1 | 
3 files changed, 1 insertions, 4 deletions
| diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py index 70f8db86..221ac8f5 100644 --- a/python/fatcat_tools/importers/datacite.py +++ b/python/fatcat_tools/importers/datacite.py @@ -869,8 +869,7 @@ class DataciteImporter(EntityImporter):                  if given_name:                      given_name = clean(given_name) -                if surname: -                    surname = clean(surname) +                surname = clean(surname)                  # Perform a final assertion that name does not reduce to zero                  # (e.g. whitespace only name). diff --git a/python/tests/files/datacite/datacite_result_33.json b/python/tests/files/datacite/datacite_result_33.json index bcb72469..cf6b8496 100644 --- a/python/tests/files/datacite/datacite_result_33.json +++ b/python/tests/files/datacite/datacite_result_33.json @@ -8,7 +8,6 @@    "contribs": [      {        "given_name": "", -      "surname": "",        "index": 0,        "raw_name": "ABC News",        "role": "author" diff --git a/python/tests/files/datacite/datacite_result_34.json b/python/tests/files/datacite/datacite_result_34.json index 4a52e22c..85641157 100644 --- a/python/tests/files/datacite/datacite_result_34.json +++ b/python/tests/files/datacite/datacite_result_34.json @@ -8,7 +8,6 @@    "contribs": [      {        "given_name": "", -      "surname": "",        "index": 0,        "raw_name": "Paul Katz",        "role": "author" | 
