Merge pull request #600 from Hestia-Homes/eco-eligiblity-bug

fixed stupid bug converting db data to float
This commit is contained in:
KhalimCK 2025-12-06 02:56:09 +08:00 committed by GitHub
commit 035897166a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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]