mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-08-07 00:29:55 +02:00
🐛 MODS/get_mets_div: Return empty list in case an ID is not found
This commit is contained in:
parent
a9d650e345
commit
eae273452c
1 changed files with 2 additions and 0 deletions
|
@ -432,6 +432,8 @@ def pages_to_dict(mets, raise_errors=True) -> List[Dict]:
|
|||
def get_mets_div(*, ID):
|
||||
if ID:
|
||||
return structMap_LOGICAL.findall(f'.//mets:div[@ID="{ID}"]', ns)
|
||||
else:
|
||||
return []
|
||||
|
||||
for page in div_physSequence:
|
||||
# TODO sort by ORDER?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue