From ef521c2df939dc898ef7045b0af4f2f759fde139 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 26 Aug 2025 18:12:42 +0100 Subject: [PATCH] fixed gbis issues --- backend/engine/engine.py | 3 ++- recommendations/optimiser/funding_optimiser.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/engine/engine.py b/backend/engine/engine.py index 85980c9c..2e1ede79 100644 --- a/backend/engine/engine.py +++ b/backend/engine/engine.py @@ -951,7 +951,8 @@ async def model_engine(body: PlanTriggerRequest): funded_measures = optimal_solution["items"] if scheme != "none" else [] solution = optimal_solution["items"] + optimal_solution["unfunded_items"] # This is the total amount of funding that the project will produce (including uplifts) (£) - project_funding = optimal_solution["full_project_funding"] + project_funding = optimal_solution["full_project_funding"] if scheme == "eco4" else \ + optimal_solution["partial_project_funding"] # This is the total amount of funding associated to the uplift (£) total_uplift = optimal_solution["total_uplift"] # This is the funding scheme selected diff --git a/recommendations/optimiser/funding_optimiser.py b/recommendations/optimiser/funding_optimiser.py index 54de928b..84ad4dbc 100644 --- a/recommendations/optimiser/funding_optimiser.py +++ b/recommendations/optimiser/funding_optimiser.py @@ -345,7 +345,7 @@ def optimise_with_funding_paths(p, input_measures, housing_type, funding: Fundin total_picks = fixed_items + picked if housing_type == "Private": - if not _prs_solution_ok(total_picks, p, funding): + if not _prs_solution_ok(total_picks, p, funding) and scheme == "eco4": logger.error( "Found a solution that does not meet the PRS requirements: %s - this shouldn't be happening", total_picks