From 0928caa9d6b0188939c0f5f0e5cc74a7a92da564 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Fri, 8 Aug 2025 12:36:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20MODS:=20Only=20add=20type=3D'tex?= =?UTF-8?q?t'=20if=20there=20is=20no=20type=20attribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mods4pandas/lib.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mods4pandas/lib.py b/src/mods4pandas/lib.py index 76f53f0..6e1005b 100644 --- a/src/mods4pandas/lib.py +++ b/src/mods4pandas/lib.py @@ -201,9 +201,10 @@ class TagGroup: def add_missing_type_text(self) -> TagGroup: for e in self.group: - if not e.attrib.get("type") == "text": + # Default to type=text + if not "type" in e.attrib: e.attrib["type"] = "text" - warnings.warn("Added type='text'") + warnings.warn("Added placeTerm type='text'") return self def remove_attributes(self, attribs) -> TagGroup: