mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Merge pull request #604 from Hestia-Homes/eco-eligiblity-bug
allow optional contingency
This commit is contained in:
commit
c320c2d565
1 changed files with 3 additions and 3 deletions
|
|
@ -46,7 +46,7 @@ def prepare_plan_data(
|
|||
|
||||
# plan costing data
|
||||
cost_of_works = sum([r["total"] for r in default_recommendations])
|
||||
contingency_cost = sum([r["contingency"] for r in default_recommendations])
|
||||
contingency_cost = sum([r.get("contingency", 0) for r in default_recommendations])
|
||||
|
||||
return {
|
||||
"portfolio_id": body.portfolio_id,
|
||||
|
|
@ -73,8 +73,8 @@ def prepare_plan_data(
|
|||
"energy_consumption_savings": float(energy_consumption_savings),
|
||||
"valuation_post_retrofit": valuation_post_retrofit,
|
||||
"valuation_increase": valuation_increase,
|
||||
"cost_of_works": cost_of_works,
|
||||
"contingency_cost": contingency_cost,
|
||||
"cost_of_works": float(cost_of_works),
|
||||
"contingency_cost": float(contingency_cost),
|
||||
"plan_type": eco_packages.get(p.id, (None, None, None))[2]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue