Skip to content

Commit

Permalink
Merge pull request #1227 from OCR-D/fix-ocrd-file-remove-url
Browse files Browse the repository at this point in the history
OcrdFile: fix removing url
  • Loading branch information
kba authored Jun 3, 2024
2 parents 3a69e65 + e00f6e6 commit 70e02be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ocrd_models/ocrd_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def url(self, url : Optional[str]) -> None:
"""
el_FLocat = self._el.find('mets:FLocat[@LOCTYPE="URL"]', NS)
if url is None:
if el_FLocat:
if el_FLocat is not None:
self._el.remove(el_FLocat)
return
if el_FLocat is None:
Expand Down

0 comments on commit 70e02be

Please sign in to comment.