mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
fix error in data.py occurring if object has no material
This commit is contained in:
@@ -323,6 +323,6 @@ class ObjectMaterialData:
|
||||
@classmethod
|
||||
def active_material_constituents(cls):
|
||||
material = cls.material
|
||||
if not material.is_a("IfcMaterialConstituentSet"):
|
||||
if not cls.material or not material.is_a("IfcMaterialConstituentSet"):
|
||||
return []
|
||||
return [m.Name for m in material.MaterialConstituents if m.Name]
|
||||
|
||||
Reference in New Issue
Block a user