Skip to content

Commit ee4ddc1

Browse files
author
Marin Visscher
committed
Fix allocation for non-functionals
1 parent bf9cce9 commit ee4ddc1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

bw_functional/allocation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ def generic_allocation(
4848
# Include functions with non-positive substitution factor
4949
products.append(product)
5050

51+
if not products:
52+
log.warning(f"No products to allocate in process {process}")
53+
return
54+
5155
# Calculate the total value for allocation
5256
total = sum([getter(product) for product in products])
5357

0 commit comments

Comments
 (0)