mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix errors removing layers/constituents after eeac0a2
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user