mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 04:04:00 +00:00
Fix #3974. Bug where orphaned histories would be left in API remove operations.
This commit is contained in:
@@ -50,7 +50,10 @@ class Usecase:
|
||||
self.file.remove(self.settings["metric"])
|
||||
for rel in self.file.by_type("IfcRelAssociatesConstraint"):
|
||||
if not rel.RelatingConstraint:
|
||||
history = rel.OwnerHistory
|
||||
self.file.remove(rel)
|
||||
if history:
|
||||
ifcopenshell.util.element.remove_deep2(self.file, history)
|
||||
for resource_rel in self.file.by_type("IfcResourceConstraintRelationship"):
|
||||
if not resource_rel.RelatingConstraint:
|
||||
self.file.remove(resource_rel)
|
||||
|
||||
Reference in New Issue
Block a user