From 776bca7c249ec49cd82db3c95ca340ce408b25ae Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 28 Dec 2023 12:20:53 +0000 Subject: [PATCH] fixing get epc data --- backend/SearchEpc.py | 1 - etl/eligibility/ha_15_32/ha25_app.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/SearchEpc.py b/backend/SearchEpc.py index f1cda010..238ae465 100644 --- a/backend/SearchEpc.py +++ b/backend/SearchEpc.py @@ -143,7 +143,6 @@ class SearchEpc: if len(uprns) == 1: return rows - logger.error("Multiple UPRNS found - we should use an alternate method of searching - TODO") if property_type is not None: # We can do a filter on the property type rows_filtered = [r for r in rows if r["property-type"] == property_type] diff --git a/etl/eligibility/ha_15_32/ha25_app.py b/etl/eligibility/ha_15_32/ha25_app.py index b2465913..07470b51 100644 --- a/etl/eligibility/ha_15_32/ha25_app.py +++ b/etl/eligibility/ha_15_32/ha25_app.py @@ -292,7 +292,7 @@ def get_epc_data(data, cleaned, cleaning_data, created_at): nodata.append(property_meta) continue - newest_epc, older_epcs, full_sap_epc = searcher.retrieve(address=property_meta["Address"]) + newest_epc, older_epcs, full_sap_epc = searcher.retrieve(address=property_meta["T1_Address"]) # We also want to get the penultimate epc penultimate_epc, _ = searcher.filter_newest_epc(older_epcs) if not penultimate_epc: @@ -336,8 +336,8 @@ def get_epc_data(data, cleaned, cleaning_data, created_at): { "row_id": property_meta["row_id"], "uprn": eligibility.epc["uprn"], - "Address": property_meta["Address"], - "Postcode": property_meta["Postcode"], + "Address": property_meta["T1_Address"], + "Postcode": property_meta["postcode"], "property_type": eligibility.epc["property-type"], "gbis_eligible": eligibility.gbis_warmfront, "eco4_eligible": eligibility.eco4_warmfront["eligible"],