mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Merge pull request #742 from Hestia-Homes/bug/correctly-map-name-to-plan-model
Add name to Plan record and include in mapping between domain and ORM Model
This commit is contained in:
commit
aa9cb58e0b
2 changed files with 3 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ class Plan:
|
|||
valuation_increase=plan_model.valuation_increase,
|
||||
cost_of_works=plan_model.cost_of_works,
|
||||
contingency_cost=plan_model.contingency_cost,
|
||||
name=plan_model.name,
|
||||
)
|
||||
return cls(record=record, scenario=scenario, id=plan_model.id)
|
||||
|
||||
|
|
@ -137,6 +138,7 @@ class Plan:
|
|||
valuation_increase=record.valuation_increase,
|
||||
cost_of_works=record.cost_of_works,
|
||||
contingency_cost=record.contingency_cost,
|
||||
name=record.name,
|
||||
)
|
||||
|
||||
return PlanPersistence(plan=plan_model, scenario=scenario_model)
|
||||
|
|
|
|||
|
|
@ -29,3 +29,4 @@ class PlanRecord:
|
|||
valuation_increase: Optional[float] = None
|
||||
cost_of_works: Optional[float] = None
|
||||
contingency_cost: Optional[float] = None
|
||||
name: Optional[str] = None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue