Fix bunch of error messages (commonly seen in IFCCSV) when you try to get a property value which is None

This commit is contained in:
Dion Moult
2021-02-01 10:18:10 +11:00
parent b09d030e12
commit 1f4df32d04
@@ -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)