Skip to content

Commit

Permalink
OcrdMets.add_file: fix finding existing el_pagediv
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky authored Mar 7, 2024
1 parent 1ed0840 commit 2740c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ocrd_models/ocrd_mets.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ def set_physical_page_for_file(self, pageId : str, ocrd_file : OcrdFile,

el_pagediv = None
if self._cache_flag:
if pageId in self._page_cache:
if pageId in self._page_cache[METS_PAGE_DIV_ATTRIBUTE.ID]:
el_pagediv = self._page_cache[METS_PAGE_DIV_ATTRIBUTE.ID][pageId]
else:
el_pagediv = el_seqdiv.find('mets:div[@ID="%s"]' % pageId, NS)
Expand Down

0 comments on commit 2740c9e

Please sign in to comment.