deleted the wrong folder aded back the origional

This commit is contained in:
Jun-te Kim 2026-03-06 14:58:49 +00:00
parent ef45ed62f8
commit 19ab0ad757

View file

@ -90,21 +90,13 @@ class OrdnanceSuveyClient:
self.results = results
# Extract some details about the best match
self.most_relevant_result = (
self.results[0]["DPA"]
if "DPA" in self.results[0]
else self.results[0]["LPI"]
)
self.most_relevant_result = self.results[0]["DPA"] if "DPA" in self.results[0] else self.results[0]["LPI"]
self.parse_classification_code(
self.most_relevant_result["CLASSIFICATION_CODE"]
)
self.parse_classification_code(self.most_relevant_result["CLASSIFICATION_CODE"])
self.set_places_address()
else:
logger.info(
"Could not find any results for the provided address and postcode"
)
logger.info("Could not find any results for the provided address and postcode")
return {"status": response.status_code}
@ -124,11 +116,11 @@ class OrdnanceSuveyClient:
value_map = {
# In the OS api, "RD" is a "Dwelling" however this is not valid property type in the EPC database
"RD": {},
"RD02": {"property_type": "House", "built_form": "Detached"},
"RD03": {"property_type": "House", "built_form": "Semi-Detached"},
"RD04": {"property_type": "House", "built_form": "Mid-Terrace"},
"RD06": {"property_type": "Flat"},
'RD': {},
'RD02': {'property_type': 'House', 'built_form': 'Detached'},
'RD03': {'property_type': 'House', 'built_form': 'Semi-Detached'},
'RD04': {'property_type': 'House', 'built_form': 'Mid-Terrace'},
'RD06': {'property_type': 'Flat'},
}
# Other classifications can be found in here:
# https://osdatahub.os.uk/docs/places/technicalSpecification in the CLASSIFICATION_CODE description.