From e82fa9c11f224878ce28c83ea0bb500cd21e3934 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 2 Jan 2024 15:44:42 +0000 Subject: [PATCH] minor changes to EpcSearcher --- backend/Property.py | 1 + backend/SearchEpc.py | 2 +- backend/app/plan/router.py | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/Property.py b/backend/Property.py index 5d465ce9..27b1e8f1 100644 --- a/backend/Property.py +++ b/backend/Property.py @@ -240,6 +240,7 @@ class Property(Definitions): if self.data["property-type"] == "Flat": self.data["built-form"] = "Semi-Detached" + self.set_year_built() self.set_energy() self.set_ventilation() self.set_solar_pv() diff --git a/backend/SearchEpc.py b/backend/SearchEpc.py index c8008906..087710b8 100644 --- a/backend/SearchEpc.py +++ b/backend/SearchEpc.py @@ -540,7 +540,7 @@ class SearchEpc: if response["status"] == 200: ( self.newest_epc, self.older_epcs, self.full_sap_epc, self.address_clean, self.postcode_clean - ) = self.extract_epc_data(address=self.ordnance_survey_client.most_relevant_result["ADDRESS"]) + ) = self.extract_epc_data() return # Step 4: If we still don't have an EPC, we estimate the EPC data diff --git a/backend/app/plan/router.py b/backend/app/plan/router.py index a0f6da7f..c7adfeb7 100644 --- a/backend/app/plan/router.py +++ b/backend/app/plan/router.py @@ -109,7 +109,6 @@ async def trigger_plan(body: PlanTriggerRequest): logger.info("Getting spatial data") for p in input_properties: - p.set_year_built() p.get_spatial_data(uprn_filenames) # The materials data could be cached or local so we don't need to make