From fb5960c4fe584dfde2d024fa8532f35a55d9cb7b Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 11 Aug 2025 18:53:20 +0100 Subject: [PATCH] fixed the funding engine --- backend/Funding.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/Funding.py b/backend/Funding.py index 0689d33b..59547058 100644 --- a/backend/Funding.py +++ b/backend/Funding.py @@ -11,7 +11,7 @@ class EligibilityCaveats(Enum): TENANT_ON_BENEFITS_OR_LOW_INCOME = "tenant_on_benefits_or_low_income" INNOVATION_REQUIRED = "innovation_required" SOLAR_NEEDS_HEATING = "solar_needs_heating" - MINIMUM_INSULATION_PRECONDITIONS_NOT_MET = "minimum_insulation_preconditions_not_met" + MINIMUM_INSULATION_PRECONgiDITIONS_NOT_MET = "minimum_insulation_preconditions_not_met" class Funding: @@ -39,6 +39,8 @@ class Funding: partial_project_scores_matrix, whlg_eligible_postcodes ): + if tenure not in [HousingType.PRIVATE, HousingType.SOCIAL]: + raise ValueError("Invalid tenure type. Must be 'Private' or 'Social'.") self.tenure = tenure self.eco4_social_cavity_abs_rate = eco4_social_cavity_abs_rate self.eco4_social_solid_abs_rate = eco4_social_solid_abs_rate