Fix #4221. Only load leaf rows with cost values. Createing a monetary measure with None results in a segfault on Windows.

This commit is contained in:
Dion Moult
2024-01-20 14:16:54 +11:00
parent 25573cd0e0
commit 96c8323a06
+1 -1
View File
@@ -134,7 +134,7 @@ class Csv2Ifc:
category = category.replace("Rate", "")
category = category.strip()
cost_value.Category = category
else:
elif cost_item["CostValues"]:
cost_value = ifcopenshell.api.run("cost.add_cost_value", self.file, parent=cost_item["ifc"])
cost_value.AppliedValue = self.file.createIfcMonetaryMeasure(cost_item["CostValues"])
if self.is_schedule_of_rates: