Fix failing test when editing a material profile with an unnamed profile

This commit is contained in:
Dion Moult
2023-02-21 09:51:30 +11:00
parent 9cc754488b
commit 2ca0b52c6a
@@ -583,7 +583,7 @@ class EnableEditingMaterialSetItem(bpy.types.Operator):
blenderbim.bim.helper.import_attributes2(material_set_item, self.props.material_set_item_attributes)
if material_set_item.is_a("IfcMaterialProfile"):
if material_set_item.Profile:
if material_set_item.Profile and material_set_item.Profile.ProfileName:
self.mprops.profiles = str(material_set_item.Profile.id())
return {"FINISHED"}