aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/work_pipeline.py
diff options
context:
space:
mode:
Diffstat (limited to 'fatcat_scholar/work_pipeline.py')
-rw-r--r--fatcat_scholar/work_pipeline.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/fatcat_scholar/work_pipeline.py b/fatcat_scholar/work_pipeline.py
index 9ce72b1..5bfc1b6 100644
--- a/fatcat_scholar/work_pipeline.py
+++ b/fatcat_scholar/work_pipeline.py
@@ -166,7 +166,9 @@ class WorkPipeline():
leaf_index = dict()
leaf_list = []
- assert 'page_numbers' in issue_meta
+ if not 'page_numbers' in issue_meta:
+ # TODO: warn
+ return None
for entry in issue_meta['page_numbers'].get('pages', []):
page_num = entry['pageNumber']
leaf_index[entry['leafNum']] = page_num