Skip to content

Commit

Permalink
ocrd workpace list-page: ignore files without pageId, fix #1148
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Dec 12, 2023
1 parent 742906e commit c7e4b91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocrd/ocrd/cli/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def list_pages(ctx, output_format, chunk_number, chunk_index, page_id_range, num
find_kwargs = {}
if page_id_range:
find_kwargs['pageId'] = page_id_range
ids = sorted({x.pageId for x in workspace.mets.find_files(**find_kwargs)})
ids = sorted({x.pageId for x in workspace.mets.find_files(**find_kwargs) if x.pageId})
if numeric_range:
start, end = map(int, numeric_range.split('..'))
ids = ids[start-1:end]
Expand Down

0 comments on commit c7e4b91

Please sign in to comment.