From e00f6e6d1b75e2c2bb65db436f15d1fab69e481e Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Fri, 24 May 2024 12:00:48 +0200 Subject: [PATCH] OcrdFile: fix removing url --- src/ocrd_models/ocrd_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ocrd_models/ocrd_file.py b/src/ocrd_models/ocrd_file.py index 963da2f96..2315a08ff 100644 --- a/src/ocrd_models/ocrd_file.py +++ b/src/ocrd_models/ocrd_file.py @@ -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: