diff --git a/neo/core/container.py b/neo/core/container.py index 89554a139..716ce32b6 100644 --- a/neo/core/container.py +++ b/neo/core/container.py @@ -514,7 +514,8 @@ def merge(self, other): lookup[obj.name] = obj ids.append(id(obj)) getattr(self, container).append(obj) - obj.set_parent(self) + if self.__class__.__name__ in obj._parent_objects: + obj.set_parent(self) # use the BaseNeo merge as well super().merge(other)