mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 02:49:12 +00:00
Fix crash where IFCTester read directly from IFC in the UI
This commit is contained in:
@@ -436,13 +436,16 @@ class Bcf(Json):
|
||||
continue
|
||||
for failure in requirement["failed_entities"]:
|
||||
element = failure["element"]
|
||||
title_components = [
|
||||
title_components = []
|
||||
for title_component in [
|
||||
element.is_a(),
|
||||
getattr(element, "Name", None) or "Unnamed",
|
||||
getattr(element, "Name", "") or "Unnamed",
|
||||
failure.get("reason", "No reason"),
|
||||
getattr(element, "GlobalId", ""),
|
||||
getattr(element, "Tag", ""),
|
||||
]
|
||||
]:
|
||||
if title_component:
|
||||
title_components.append(title_component)
|
||||
title = " - ".join(title_components)
|
||||
description = f'{specification["name"]} - {requirement["description"]}'
|
||||
topic = bcfxml.add_topic(title, description, "IfcTester")
|
||||
|
||||
Reference in New Issue
Block a user