mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
deleted the wrong folder aded back the origional
This commit is contained in:
parent
ef45ed62f8
commit
19ab0ad757
1 changed files with 8 additions and 16 deletions
|
|
@ -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.
|
||||
Loading…
Add table
Reference in a new issue