mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
calculate_cost_item_resource_value - fix bug when 0 resource cost value would be misinterpreted as parent's cost value
This commit is contained in:
@@ -101,7 +101,7 @@ def calculate_cost_item_resource_value(file: ifcopenshell.file, cost_item: ifcop
|
|||||||
|
|
||||||
for resource in resources:
|
for resource in resources:
|
||||||
cost, unit = ifcopenshell.util.resource.get_cost(resource)
|
cost, unit = ifcopenshell.util.resource.get_cost(resource)
|
||||||
if not cost:
|
if cost is None:
|
||||||
# Concept to standardise - Not defined in schema, but this makes manual scheduling of resources 10x faster and less duplicate data.
|
# Concept to standardise - Not defined in schema, but this makes manual scheduling of resources 10x faster and less duplicate data.
|
||||||
parent_cost = ifcopenshell.util.resource.get_parent_cost(resource)
|
parent_cost = ifcopenshell.util.resource.get_parent_cost(resource)
|
||||||
assert parent_cost
|
assert parent_cost
|
||||||
|
|||||||
Reference in New Issue
Block a user