aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-29 15:36:30 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-29 15:36:30 -0800
commit6dde672e1ac27737625416816f2d9134a80fd144 (patch)
tree888db359eb315b100330bd005677be9599f26dce
parent2a8dd7dece9ddc5be007b138c633705f759ed777 (diff)
downloadfatcat-6dde672e1ac27737625416816f2d9134a80fd144.tar.gz
fatcat-6dde672e1ac27737625416816f2d9134a80fd144.zip
ensure raw_name is not stub
-rw-r--r--python/fatcat_tools/importers/crossref.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/fatcat_tools/importers/crossref.py b/python/fatcat_tools/importers/crossref.py
index 00b039d9..c81349f3 100644
--- a/python/fatcat_tools/importers/crossref.py
+++ b/python/fatcat_tools/importers/crossref.py
@@ -171,10 +171,13 @@ class CrossrefImporter(EntityImporter):
if not extra:
extra = None
assert ctype in ("author", "editor", "translator")
+ raw_name = clean(raw_name)
+ if not raw_name or len(raw_name) <= 1:
+ raw_name = None
contribs.append(fatcat_client.ReleaseContrib(
creator_id=creator_id,
index=index,
- raw_name=clean(raw_name),
+ raw_name=raw_name,
raw_affiliation=clean(raw_affiliation),
role=ctype,
extra=extra))