summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-28 22:37:45 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-28 22:37:45 -0800
commit1c3d7d7f1bfea647dc5f1a99ad534fb29c8b0974 (patch)
tree4527bb70ee5dda49d53a18b26b970b2e910b4395 /python/fatcat_tools/importers
parent6a4f7d5232eb44518420e956f6464ce306390fd3 (diff)
downloadfatcat-1c3d7d7f1bfea647dc5f1a99ad534fb29c8b0974.tar.gz
fatcat-1c3d7d7f1bfea647dc5f1a99ad534fb29c8b0974.zip
fix title length checks in crossref
Diffstat (limited to 'python/fatcat_tools/importers')
-rw-r--r--python/fatcat_tools/importers/crossref.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/crossref.py b/python/fatcat_tools/importers/crossref.py
index 082a638b..7fc915a3 100644
--- a/python/fatcat_tools/importers/crossref.py
+++ b/python/fatcat_tools/importers/crossref.py
@@ -338,13 +338,13 @@ class CrossrefImporter(EntityImporter):
original_title = None
if obj.get('original-title'):
original_title = clean(obj.get('original-title')[0], force_xml=True)
- if len(original_title) < 2:
+ if not original_title or len(original_title) < 2:
original_title = None
title = None
if obj.get('title'):
title = clean(obj.get('title')[0], force_xml=True)
- if len(title) < 2:
+ if not title or len(title) < 2:
# title can't be just a single character
return None