ElementBase: add weak ref to parent when using append()
This commit is contained in:
parent
fea4ee83be
commit
465e735d18
@ -1243,7 +1243,7 @@ class ElementBase(object):
|
||||
self.init_plugin(item.__class__.plugin_multi_attrib)
|
||||
else:
|
||||
self.iterables.append(item)
|
||||
|
||||
item.parent = weakref.ref(self)
|
||||
return self
|
||||
|
||||
def appendxml(self, xml: ET.Element) -> ElementBase:
|
||||
|
Loading…
Reference in New Issue
Block a user