1
0
Fork 0
mirror of https://github.com/qurator-spk/modstool.git synced 2025-08-05 07:39:54 +02:00

🧹 Fix recordIdentifier attribute 'type' 'zdb' to the correct 'source'

This commit is contained in:
Gerber, Mike 2025-07-30 13:03:50 +02:00
parent b12973adb1
commit 814bc57401

View file

@ -269,6 +269,14 @@ class TagGroup:
counts = {f"{xpath_expr}-count": len(values)}
return counts
def fix_recordIdentifier_source_zdb(self) -> TagGroup:
for e in self.group:
if e.get("type") == "zdb":
e.attrib["source"] = "zdb"
del e.attrib["type"]
warnings.warn("Fixed recordIdentifier type 'zdb' to source")
return self
def sorted_groupby(iterable, key=None):
"""