mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Merge pull request #357 from Hestia-Homes/vectis-prediction-tests
Added additional scenarios to generate_scenarios_data
This commit is contained in:
commit
1bd7c4ef17
3 changed files with 1230 additions and 34 deletions
|
|
@ -412,9 +412,12 @@ async def trigger_plan(body: PlanTriggerRequest):
|
||||||
# We check for an energy assessment we have performed on this property:
|
# We check for an energy assessment we have performed on this property:
|
||||||
energy_assessment = get_latest_assessment_by_uprn(session, uprn if uprn is not None else epc_searcher.uprn)
|
energy_assessment = get_latest_assessment_by_uprn(session, uprn if uprn is not None else epc_searcher.uprn)
|
||||||
|
|
||||||
|
if not energy_assessment["epc"]:
|
||||||
|
continue
|
||||||
# Create a record in db
|
# Create a record in db
|
||||||
property_id, is_new = create_property(
|
property_id, is_new = create_property(
|
||||||
session, body.portfolio_id, epc_searcher.address_clean, epc_searcher.postcode_clean, epc_searcher.uprn,
|
session, body.portfolio_id, epc_searcher.address_clean, epc_searcher.postcode_clean,
|
||||||
|
epc_searcher.uprn,
|
||||||
energy_assessment
|
energy_assessment
|
||||||
)
|
)
|
||||||
if not is_new and not body.multi_plan:
|
if not is_new and not body.multi_plan:
|
||||||
|
|
|
||||||
|
|
@ -575,6 +575,8 @@ class EPCRecord:
|
||||||
mains_gas_map = {
|
mains_gas_map = {
|
||||||
"Y": True,
|
"Y": True,
|
||||||
"N": False,
|
"N": False,
|
||||||
|
True: True,
|
||||||
|
False: False
|
||||||
}
|
}
|
||||||
|
|
||||||
self.prepared_epc["mains-gas-flag"] = (
|
self.prepared_epc["mains-gas-flag"] = (
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue