mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-08-14 03:59:53 +02:00
🧹 MODS: Only add type='text' if there is no type attribute
This commit is contained in:
parent
b9190a3695
commit
0928caa9d6
1 changed files with 3 additions and 2 deletions
|
@ -201,9 +201,10 @@ class TagGroup:
|
||||||
|
|
||||||
def add_missing_type_text(self) -> TagGroup:
|
def add_missing_type_text(self) -> TagGroup:
|
||||||
for e in self.group:
|
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"
|
e.attrib["type"] = "text"
|
||||||
warnings.warn("Added type='text'")
|
warnings.warn("Added placeTerm type='text'")
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def remove_attributes(self, attribs) -> TagGroup:
|
def remove_attributes(self, attribs) -> TagGroup:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue