diff --git a/src/ansys/acp/core/_tree_objects/base.py b/src/ansys/acp/core/_tree_objects/base.py index b006695556..42c7afac8e 100644 --- a/src/ansys/acp/core/_tree_objects/base.py +++ b/src/ansys/acp/core/_tree_objects/base.py @@ -306,6 +306,9 @@ def store(self: Self, parent: TreeObject) -> None: path_values = [collection_path.value] + [ path.value for _, _, path in linked_path_fields(self._pb_object.properties) ] + # filter out empty paths + path_values = [path for path in path_values if path] + # Since the path starts with 'model/', the objects belong to # the same model iff they share at least the first two parts. if len(to_parts(common_path(*path_values))) < 2: