From ea1a7b559d7fd3fa1c3f4b54365fe2eeebf0a3b3 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 21 Feb 2025 22:57:56 +0000 Subject: [PATCH] fixed bug with calling find epc --- asset_list/app.py | 10 +++++----- etl/find_my_epc/RetrieveFindMyEpc.py | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/asset_list/app.py b/asset_list/app.py index 34cc9579..3c1ab627 100644 --- a/asset_list/app.py +++ b/asset_list/app.py @@ -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 ) diff --git a/etl/find_my_epc/RetrieveFindMyEpc.py b/etl/find_my_epc/RetrieveFindMyEpc.py index eaba1058..9852cc0d 100644 --- a/etl/find_my_epc/RetrieveFindMyEpc.py +++ b/etl/find_my_epc/RetrieveFindMyEpc.py @@ -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