diff --git a/assume/common/base.py b/assume/common/base.py index 73553835d..169279821 100644 --- a/assume/common/base.py +++ b/assume/common/base.py @@ -148,7 +148,9 @@ def set_dispatch_plan( self.outputs[product_type].loc[start:end_excl] += added_volume # Get the accepted price and store it in the outputs - if isinstance(order["accepted_price"], dict): + if "accepted_price" not in order: + accepted_price = 0 + elif isinstance(order["accepted_price"], dict): accepted_price = list(order["accepted_price"].values()) else: accepted_price = order["accepted_price"]