mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
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:
@@ -45,7 +45,7 @@ def get_properties(properties):
|
|||||||
results = {}
|
results = {}
|
||||||
for prop in properties:
|
for prop in properties:
|
||||||
if prop.is_a("IfcPropertySingleValue"):
|
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"):
|
elif prop.is_a("IfcComplexProperty"):
|
||||||
data = prop.get_info()
|
data = prop.get_info()
|
||||||
data["properties"] = get_properties(prop.HasProperties)
|
data["properties"] = get_properties(prop.HasProperties)
|
||||||
|
|||||||
Reference in New Issue
Block a user