From 1f4df32d04216725fb5c7de8adfdcd8dfb0b62d4 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 1 Feb 2021 10:18:10 +1100 Subject: [PATCH] Fix bunch of error messages (commonly seen in IFCCSV) when you try to get a property value which is 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 f947dccfc0..197d045562 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/element.py +++ b/src/ifcopenshell-python/ifcopenshell/util/element.py @@ -45,7 +45,7 @@ def get_properties(properties): results = {} for prop in properties: if prop.is_a("IfcPropertySingleValue"): - results[prop.Name] = prop.NominalValue.wrappedValue + results[prop.Name] = prop.NominalValue.wrappedValue if prop.NominalValue else None elif prop.is_a("IfcComplexProperty"): data = prop.get_info() data["properties"] = get_properties(prop.HasProperties)