mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
fixed bug with calling find epc
This commit is contained in:
parent
d1dc536ab0
commit
ea1a7b559d
2 changed files with 7 additions and 6 deletions
|
|
@ -34,6 +34,9 @@ def get_data(
|
|||
"flat": "Flat",
|
||||
"maisonette": "Maisonette",
|
||||
"bungalow": "Bungalow",
|
||||
"block house": "House",
|
||||
"coach house": "House",
|
||||
"bedsit": "Flat"
|
||||
}
|
||||
|
||||
epc_data = []
|
||||
|
|
@ -107,7 +110,7 @@ def get_data(
|
|||
searcher.find_property(skip_os=True)
|
||||
|
||||
# As a final resort, we estimate the EPC
|
||||
if property_type is not None:
|
||||
if property_type is not None and searcher.newest_epc is None:
|
||||
searcher.ordnance_survey_client.property_type = property_type
|
||||
searcher.find_property(skip_os=True)
|
||||
|
||||
|
|
@ -344,11 +347,8 @@ def app():
|
|||
# We now retrieve any failed properties
|
||||
chunk_failed = chunk[chunk[asset_list.DOMNA_PROPERTY_ID].isin(errors_chunk)]
|
||||
epc_data_failed, _, _ = get_data(
|
||||
asset_list=chunk_failed,
|
||||
df=chunk_failed,
|
||||
row_id_name=asset_list.DOMNA_PROPERTY_ID,
|
||||
fulladdress_column=FULLADDRESS_COLUMN,
|
||||
address1_column=ADDRESS1_COLUMN,
|
||||
postcode_column=POSTCODE_COLUMN,
|
||||
manual_uprn_map=MANUAL_UPRN_MAP,
|
||||
epc_api_only=False
|
||||
)
|
||||
|
|
|
|||
|
|
@ -330,7 +330,8 @@ class RetrieveFindMyEpc:
|
|||
"roomstat_programmer_trvs", "time_temperature_zone_control"
|
||||
],
|
||||
"Replacement warm air unit": [],
|
||||
"Secondary glazing": ["secondary_glazing"]
|
||||
"Secondary glazing": ["secondary_glazing"],
|
||||
"Condensing heating unit": ["boiler_upgrade"],
|
||||
}
|
||||
|
||||
survey = True
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue