Bonsai - prevent duplicating IfcOpenShell organization for new IfcApplications

This commit is contained in:
Andrej730
2025-06-20 13:18:20 +05:00
parent 6599f74d11
commit d05f320665
+2
View File
@@ -291,8 +291,10 @@ def get_application(ifc: ifcopenshell.file) -> ifcopenshell.entity_instance:
for element in ifc.by_type("IfcApplication"):
if element.ApplicationIdentifier == identifier:
return element
application_developer = next((org for org in ifc.by_type("IfcOrganization") if org.Name == "IfcOpenShell"), None)
application = ifcopenshell.api.owner.add_application(
ifc,
application_developer=application_developer,
version=version,
application_full_name="Bonsai",
application_identifier=identifier,