Fix errors removing layers/constituents after eeac0a2

This commit is contained in:
Andrej730
2025-02-18 16:06:51 +05:00
parent a68cb74699
commit 8ea3142451
2 changed files with 3 additions and 3 deletions
@@ -52,7 +52,7 @@ def remove_constituent(
# invalid.
ifcopenshell.api.material.remove_constituent(model, constituent=glazing)
"""
material = layer.Material
material = constituent.Material
file.remove(constituent)
if material and should_remove_material:
ifcopenshell.util.element.remove_deep2(file, subelement)
ifcopenshell.util.element.remove_deep2(file, material)
@@ -57,4 +57,4 @@ def remove_layer(
material = layer.Material
file.remove(layer)
if material and should_remove_material:
ifcopenshell.util.element.remove_deep2(file, subelement)
ifcopenshell.util.element.remove_deep2(file, material)