summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/jalc.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_tools/importers/jalc.py')
-rw-r--r--python/fatcat_tools/importers/jalc.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/python/fatcat_tools/importers/jalc.py b/python/fatcat_tools/importers/jalc.py
index a0e0086b..351a20a3 100644
--- a/python/fatcat_tools/importers/jalc.py
+++ b/python/fatcat_tools/importers/jalc.py
@@ -209,10 +209,14 @@ class JalcImporter(EntityImporter):
release_year = int(date)
pages = None
- if record.startingPage:
- pages = record.startingPage.string
- if record.endingPage:
- pages = "{}-{}".format(pages, record.endingPage.string)
+ if record.startingPage and record.startingPage.string.strip():
+ pages = record.startingPage.string.strip()
+ if record.endingPage and record.endingPage.string.strip():
+ pages = "{}-{}".format(pages, record.endingPage.string.strip())
+ # double check to prevent "-" as pages
+ if pages and pages.strip() == '-':
+ pages = None
+
volume = None
if record.volume:
volume = record.volume.string