mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +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",
|
"flat": "Flat",
|
||||||
"maisonette": "Maisonette",
|
"maisonette": "Maisonette",
|
||||||
"bungalow": "Bungalow",
|
"bungalow": "Bungalow",
|
||||||
|
"block house": "House",
|
||||||
|
"coach house": "House",
|
||||||
|
"bedsit": "Flat"
|
||||||
}
|
}
|
||||||
|
|
||||||
epc_data = []
|
epc_data = []
|
||||||
|
|
@ -107,7 +110,7 @@ def get_data(
|
||||||
searcher.find_property(skip_os=True)
|
searcher.find_property(skip_os=True)
|
||||||
|
|
||||||
# As a final resort, we estimate the EPC
|
# 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.ordnance_survey_client.property_type = property_type
|
||||||
searcher.find_property(skip_os=True)
|
searcher.find_property(skip_os=True)
|
||||||
|
|
||||||
|
|
@ -344,11 +347,8 @@ def app():
|
||||||
# We now retrieve any failed properties
|
# We now retrieve any failed properties
|
||||||
chunk_failed = chunk[chunk[asset_list.DOMNA_PROPERTY_ID].isin(errors_chunk)]
|
chunk_failed = chunk[chunk[asset_list.DOMNA_PROPERTY_ID].isin(errors_chunk)]
|
||||||
epc_data_failed, _, _ = get_data(
|
epc_data_failed, _, _ = get_data(
|
||||||
asset_list=chunk_failed,
|
df=chunk_failed,
|
||||||
row_id_name=asset_list.DOMNA_PROPERTY_ID,
|
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,
|
manual_uprn_map=MANUAL_UPRN_MAP,
|
||||||
epc_api_only=False
|
epc_api_only=False
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,8 @@ class RetrieveFindMyEpc:
|
||||||
"roomstat_programmer_trvs", "time_temperature_zone_control"
|
"roomstat_programmer_trvs", "time_temperature_zone_control"
|
||||||
],
|
],
|
||||||
"Replacement warm air unit": [],
|
"Replacement warm air unit": [],
|
||||||
"Secondary glazing": ["secondary_glazing"]
|
"Secondary glazing": ["secondary_glazing"],
|
||||||
|
"Condensing heating unit": ["boiler_upgrade"],
|
||||||
}
|
}
|
||||||
|
|
||||||
survey = True
|
survey = True
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue