mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Adding back storage of property details epc
This commit is contained in:
parent
d4d9b8e518
commit
c948c24061
1 changed files with 5 additions and 9 deletions
|
|
@ -734,15 +734,11 @@ async def trigger_plan(body: PlanTriggerRequest):
|
|||
|
||||
valuations = PropertyValuation.estimate(property_instance=p, target_epc=new_epc)
|
||||
property_value_increase_ranges[p.id] = valuations
|
||||
|
||||
# Your existing operations
|
||||
# If we have an energy assessment, which is more recent than the EPC, we don't need to store
|
||||
# the EPC details in the database
|
||||
if not p.energy_assessment_is_newer:
|
||||
property_details_epc = p.get_property_details_epc(
|
||||
portfolio_id=body.portfolio_id, rating_lookup=rating_lookup,
|
||||
)
|
||||
create_property_details_epc(session, property_details_epc)
|
||||
|
||||
property_details_epc = p.get_property_details_epc(
|
||||
portfolio_id=body.portfolio_id, rating_lookup=rating_lookup,
|
||||
)
|
||||
create_property_details_epc(session, property_details_epc)
|
||||
|
||||
update_or_create_property_spatial_details(session, p.uprn, p.spatial)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue