removed self.property_components from find my epc

This commit is contained in:
Khalim Conn-Kowlessar 2026-01-28 12:08:31 +00:00
parent c30c7395da
commit fad9512fd7

View file

@ -38,7 +38,6 @@ class RetrieveFindMyEpc:
self.address_cleaned = self.address.replace(",", "").replace(" ", "").lower()
# Containers for the extracted components
self.property_components = []
self.walls = []
self.address_postal_town = address_postal_town
@ -259,10 +258,10 @@ class RetrieveFindMyEpc:
property_features_table = soup.find("tbody", class_="govuk-table__body")
property_features_table = property_features_table.find_all("tr")
self.extract_property_components(property_features_table)
property_components = self.extract_property_components(property_features_table)
# Extract walls
self.walls = [x["description"] for x in self.property_components if x["component_name"] == "Wall"]
self.walls = [x["description"] for x in property_components if x["component_name"] == "Wall"]
# Finally, we format the recommendations
recommendations = self.format_recommendations(recommendations, assessment_data, sap_2012_date)
@ -612,7 +611,7 @@ class RetrieveFindMyEpc:
property_components = self.extract_property_components(property_features_table)
# Extract walls
self.walls = [x["description"] for x in self.property_components if x["component_name"] == "Wall"]
self.walls = [x["description"] for x in property_components if x["component_name"] == "Wall"]
# Finally, we format the recommendations
recommendations = self.format_recommendations(recommendations, assessment_data, sap_2012_date)