diff --git a/backend/app/db/functions/recommendations_functions.py b/backend/app/db/functions/recommendations_functions.py index 542dde93..dfdd153e 100644 --- a/backend/app/db/functions/recommendations_functions.py +++ b/backend/app/db/functions/recommendations_functions.py @@ -59,14 +59,14 @@ def prepare_plan_data( "valuation_increase_average": ( valuations["average_increased_value"] - valuations["current_value"] ), - "post_sap_points": new_sap_points, + "post_sap_points": float(new_sap_points), "post_epc_rating": new_epc, - "post_co2_emissions": post_co2_emissions, - "co2_savings": co2_savings, - "post_energy_bill": post_energy_bill, - "energy_bill_savings": energy_bill_savings, - "post_energy_consumption": post_energy_consumption, - "energy_consumption_savings": energy_consumption_savings, + "post_co2_emissions": float(post_co2_emissions), + "co2_savings": float(co2_savings), + "post_energy_bill": float(post_energy_bill), + "energy_bill_savings": float(energy_bill_savings), + "post_energy_consumption": float(post_energy_consumption), + "energy_consumption_savings": float(energy_consumption_savings), "valuation_post_retrofit": valuation_post_retrofit, "valuation_increase": valuation_increase, "plan_type": eco_packages.get(p.id, (None, None, None))[2]