From 3acad1e04962d2d3d554ac6deb90e5430eec1c25 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 14 Nov 2025 23:47:56 +0000 Subject: [PATCH] handle rir pps filtering --- backend/Funding.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/Funding.py b/backend/Funding.py index bd4b2edf..fe5165f6 100644 --- a/backend/Funding.py +++ b/backend/Funding.py @@ -603,6 +603,8 @@ class Funding: code = "RIRI_res_unin" pps = filtered_pps_matrix[filtered_pps_matrix["Measure_Type"] == code] if pps.shape[0] != 1: + if pps.empty and self.starting_sap_band in ["Low_C", "High_C", "Low_B", "High_B", "Low_A", "High_A"]: + return 0 raise ValueError(f"Invalid RIRI category: {code}") return pps.squeeze()["Cost Savings"]