From f0b9c9ad7b4ec13b66177e8b3b0e222ddf3704d8 Mon Sep 17 00:00:00 2001 From: Vukas Pajic Date: Fri, 18 Nov 2022 14:35:57 +0100 Subject: [PATCH] #2602 get_properties no longer throws error when EnumerationValues = None --- src/ifcopenshell-python/ifcopenshell/util/element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py index 8915d205c8..af89a2e15d 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/element.py +++ b/src/ifcopenshell-python/ifcopenshell/util/element.py @@ -100,7 +100,7 @@ def get_properties(properties): if prop.is_a("IfcPropertySingleValue"): results[prop.Name] = prop.NominalValue.wrappedValue if prop.NominalValue else None elif prop.is_a("IfcPropertyEnumeratedValue"): - results[prop.Name] = [v.wrappedValue for v in prop.EnumerationValues] or None + results[prop.Name] = [v.wrappedValue for v in prop.EnumerationValues] if prop.EnumerationValues else None elif prop.is_a("IfcPropertyListValue"): results[prop.Name] = [v.wrappedValue for v in prop.ListValues] or None elif prop.is_a("IfcPropertyBoundedValue"):