Fix error when the user selects a class suggestion that is not a predefined type

This commit is contained in:
Gorgious56
2022-11-03 08:21:55 +01:00
parent 8dd8a23af9
commit 841bb59d18
+4 -1
View File
@@ -612,7 +612,10 @@ def update_enum_property_search_prop(self, context):
setattr(context.data, self.prop_name, self.collection_identifiers[i].name)
predefined_type = self.collection_predefined_types[i].name
if predefined_type:
setattr(context.data, "ifc_predefined_type", predefined_type)
try:
setattr(context.data, "ifc_predefined_type", predefined_type)
except TypeError: # User clicked on a suggestion, but it's not a predefined type
pass
break