Undo indentation from commit <e08283350> (did not account for no name existing)

This commit is contained in:
rileywong311
2023-08-23 18:17:18 -07:00
parent 7220dd024e
commit c27d9ad382
+7 -6
View File
@@ -149,14 +149,15 @@ class Brick(blenderbim.core.tool.Brick):
}
LIMIT 1
""".replace("{brick_uri}", brick_uri))
name = None
for row in query:
name = str(row.get("label"))
if not name:
name = brick_uri.split("#")[-1]
if tool.Ifc.get_schema() == "IFC2X3":
return {"ItemReference": brick_uri, "Name": name}
else:
return {"Identification": brick_uri, "Name": name}
if not name:
name = brick_uri.split("#")[-1]
if tool.Ifc.get_schema() == "IFC2X3":
return {"ItemReference": brick_uri, "Name": name}
else:
return {"Identification": brick_uri, "Name": name}
@classmethod
def get_active_brick_class(cls, split_screen=False):