Fix #3432. Bug where null applicable occurrence of a type product caused the annotation tool to fail.

This commit is contained in:
Dion Moult
2023-07-13 11:27:01 +10:00
parent 91e7d49060
commit 3adfc63b65
+5 -1
View File
@@ -151,7 +151,11 @@ class Drawing(blenderbim.core.tool.Drawing):
if element_type == "IfcAnnotation" and element.ObjectType in object_types:
return True
if element_type == "IfcTypeProduct" and element.ApplicableOccurrence.startswith("IfcAnnotation/"):
if (
element_type == "IfcTypeProduct"
and element.ApplicableOccurrence
and element.ApplicableOccurrence.startswith("IfcAnnotation/")
):
applicable_object_type = element.ApplicableOccurrence.split("/")[1]
if applicable_object_type in object_types:
return True