Skip to content

Commit 1f4df32

Browse files
committed
Fix bunch of error messages (commonly seen in IFCCSV) when you try to get a property value which is None
1 parent b09d030 commit 1f4df32

File tree

1 file changed

+1
-1
lines changed
  • src/ifcopenshell-python/ifcopenshell/util

1 file changed

+1
-1
lines changed

src/ifcopenshell-python/ifcopenshell/util/element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def get_properties(properties):
4545
results = {}
4646
for prop in properties:
4747
if prop.is_a("IfcPropertySingleValue"):
48-
results[prop.Name] = prop.NominalValue.wrappedValue
48+
results[prop.Name] = prop.NominalValue.wrappedValue if prop.NominalValue else None
4949
elif prop.is_a("IfcComplexProperty"):
5050
data = prop.get_info()
5151
data["properties"] = get_properties(prop.HasProperties)

0 commit comments

Comments
 (0)