There's an .unwrap_or(MoneyPerFlow(0.0)) statement in get_revenue_from_flows_with_filter that I feel uneasy about every time I come across.
I don't think it's reasonable to broadly assume that if a price is missing then the price is zero. Not saying there's a bug here, as we probably are only doing this for commodities that are genuinely unpriced (e.g. OTH commodities), but I still think we should design this whole part of the code in a more intentional way, as otherwise it's easy to imagine a bug creeping in.
There's an
.unwrap_or(MoneyPerFlow(0.0))statement inget_revenue_from_flows_with_filterthat I feel uneasy about every time I come across.I don't think it's reasonable to broadly assume that if a price is missing then the price is zero. Not saying there's a bug here, as we probably are only doing this for commodities that are genuinely unpriced (e.g. OTH commodities), but I still think we should design this whole part of the code in a more intentional way, as otherwise it's easy to imagine a bug creeping in.