Commit 865776f1 authored by Merlijn Wajer's avatar Merlijn Wajer
Browse files

scandata: deal with single-page scandata

parent 19b0df30
......@@ -75,9 +75,15 @@ def scandata_get_skip_pages(scandata):
skip = []
for idx in range(len(scandata['book']['pageData']['page'])):
pages = scandata['book']['pageData']['page']
# If there is just one page, pages is not a list.
if not isinstance(pages, list):
pages = [pages]
for idx in range(len(pages)):
add_to_access_format = scandata['book']['pageData']['page'][idx]['addToAccessFormats']
add_to_access_format = pages[idx]['addToAccessFormats']
if add_to_access_format == 'false':
except KeyError:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment