mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 22:31:55 +00:00
See #7716. Remove_cost_item also delete the assignment
Previously remove_cost_item leaved orphaned relation now it should be fixed
This commit is contained in:
committed by
Thomas Krijnen
parent
0ca9fd2773
commit
1512947c83
@@ -51,7 +51,7 @@ def remove_cost_item(file: ifcopenshell.file, cost_item: ifcopenshell.entity_ins
|
|||||||
if history:
|
if history:
|
||||||
ifcopenshell.util.element.remove_deep2(file, history)
|
ifcopenshell.util.element.remove_deep2(file, history)
|
||||||
elif inverse.is_a("IfcRelAssignsToControl"):
|
elif inverse.is_a("IfcRelAssignsToControl"):
|
||||||
if len(inverse.RelatedObjects) >= 2 or inverse.RelatingControl == cost_item:
|
if len(inverse.RelatedObjects) >= 2:
|
||||||
continue
|
continue
|
||||||
history = inverse.OwnerHistory
|
history = inverse.OwnerHistory
|
||||||
file.remove(inverse)
|
file.remove(inverse)
|
||||||
|
|||||||
Reference in New Issue
Block a user