Commit 19b0df30 authored by Derek Fukumori's avatar Derek Fukumori
Browse files

scandata: fix scandata path when source file is page_numbers.json

parent 2ea2a759
......@@ -25,7 +25,11 @@ def get_scandata_xml(identifier, source_file):
zip_path = item_dir/'scandata.zip'
raw_xml_path = item_dir/'scandata.xml'
identifier_xml_path = item_dir/f'{identifier}_scandata.xml'
source_xml_path = Path(f'{source_file.rsplit("_", 1)[0]}_scandata.xml')
if source_file:
if source_file.endswith('page_numbers.json'):
source_xml_path = Path(f'{source_file[:-18]}_scandata.xml')
else:
source_xml_path = Path(f'{source_file.rsplit("_", 1)[0]}_scandata.xml')
if source_xml_path.exists():
return source_xml_path
......
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