diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py b/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py index edac53057a..3371d3e200 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py @@ -107,11 +107,10 @@ def calculate_cost_item_resource_value(file: ifcopenshell.file, cost_item: ifcop assert parent_cost cost, unit = parent_cost quantity = ifcopenshell.util.resource.get_quantity(resource) - if cost is None or quantity is None: + if cost is None: continue if unit and "day" in unit: quantity = quantity / 8 # Assume 8 hour working day - TODO implement resource calendar - quantity = round(quantity, 5) formula = "{}*{}".format(cost, quantity) cost_value = ifcopenshell.api.cost.add_cost_value(file, parent=settings["cost_item"]) cost_value.Name = resource.Name