diff --git a/backend/app/db/functions/recommendations_functions.py b/backend/app/db/functions/recommendations_functions.py index d6e41c61..d26adf66 100644 --- a/backend/app/db/functions/recommendations_functions.py +++ b/backend/app/db/functions/recommendations_functions.py @@ -138,7 +138,7 @@ def upload_recommendations(session: Session, recommendations_to_upload, property "recommendation_id": recommendation_id, "material_id": part["id"], "depth": int(part["depth"]) if part["depth"] else None, - "quantity": part["quantity"], + "quantity": float(part["quantity"]), "quantity_unit": part["quantity_unit"], "estimated_cost": part["total"], } diff --git a/backend/app/plan/router.py b/backend/app/plan/router.py index 849f7fd7..fb896659 100644 --- a/backend/app/plan/router.py +++ b/backend/app/plan/router.py @@ -753,22 +753,22 @@ async def trigger_plan(body: PlanTriggerRequest): # Funding # ~~~~~~~~~~~~~~~~ - for p in input_properties: - funding_calulator = Funding( - tenure=body.housing_type, - starting_epc=p.data["current-energy-rating"], - starting_sap=int(p.data["current-energy-efficiency"]), - floor_area=p.floor_area, - council_tax_band=None, # This is seemingly always None at the moment - property_recommendations=recommendations[p.id], - project_scores_matrix=eco_project_scores_matrix, - gbis_abs_rate=20, - eco4_abs_rate=20, - ) - funding_calulator.check_eligibiltiy() - # Insert finding - p.insert_funding(funding_calulator) - + # for p in input_properties: + # funding_calulator = Funding( + # tenure=body.housing_type, + # starting_epc=p.data["current-energy-rating"], + # starting_sap=int(p.data["current-energy-efficiency"]), + # floor_area=p.floor_area, + # council_tax_band=None, # This is seemingly always None at the moment + # property_recommendations=recommendations[p.id], + # project_scores_matrix=eco_project_scores_matrix, + # gbis_abs_rate=20, + # eco4_abs_rate=20, + # ) + # funding_calulator.check_eligibiltiy() + # # Insert finding + # p.insert_funding(funding_calulator) + logger.info("Uploading recommendations to the database") # If we have any work to do, we create a new scenario engine_scenario = create_scenario( diff --git a/etl/customers/connells/pilot_remote_assessments.py b/etl/customers/connells/pilot_remote_assessments.py index 9eace9c8..799bd805 100644 --- a/etl/customers/connells/pilot_remote_assessments.py +++ b/etl/customers/connells/pilot_remote_assessments.py @@ -28,7 +28,7 @@ def app(): valuations_data = [ {'uprn': 100071188496, "valuation": 175_000}, - {'uprn': 100090136026, "valuation": 183_000}, + {'uprn': 100071136271, "valuation": 183_000}, {'uprn': 100071194376, "valuation": 221_000}, {'uprn': 100071176297, "valuation": 208_000}, ]