mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
fix error removing pset from material or profile
This commit is contained in:
@@ -75,7 +75,8 @@ class Usecase:
|
|||||||
if enumeration and self.file.get_total_inverses(enumeration) == 1:
|
if enumeration and self.file.get_total_inverses(enumeration) == 1:
|
||||||
self.file.remove(enumeration)
|
self.file.remove(enumeration)
|
||||||
self.file.remove(prop)
|
self.file.remove(prop)
|
||||||
history = self.settings["pset"].OwnerHistory
|
# IfcMaterialProperties and IfcProfileProperties don't have OwnerHistory
|
||||||
|
history = getattr(self.settings["pset"], "OwnerHistory", None)
|
||||||
self.file.remove(self.settings["pset"])
|
self.file.remove(self.settings["pset"])
|
||||||
if history:
|
if history:
|
||||||
ifcopenshell.util.element.remove_deep2(self.file, history)
|
ifcopenshell.util.element.remove_deep2(self.file, history)
|
||||||
|
|||||||
Reference in New Issue
Block a user