mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
handle bug with park hoems
This commit is contained in:
parent
97a7aadcf7
commit
98e6265b5d
1 changed files with 7 additions and 2 deletions
|
|
@ -431,7 +431,7 @@ class SearchEpc:
|
|||
"Flat": "flat",
|
||||
"House": "house",
|
||||
"Maisonette": "maisonette",
|
||||
"Park Home": "park home",
|
||||
"Park home": "park home",
|
||||
}
|
||||
|
||||
postcode = initial_postcode
|
||||
|
|
@ -489,12 +489,17 @@ class SearchEpc:
|
|||
|
||||
# We handle some edge cases experiences with maisonettes - if built form is detatched, just filter
|
||||
# on maisonette
|
||||
# We also add some additional logic for bungalows, because they are far less common than other
|
||||
# We also add some additional logic for Park homes, because they are far less common than other
|
||||
# property types
|
||||
|
||||
if (estimation_property_type == "Maisonette") & (
|
||||
estimation_built_form in ["Detached", "Semi-Detached"]
|
||||
):
|
||||
epc_data = epc_data[epc_data["property-type"] == estimation_property_type]
|
||||
elif (estimation_property_type == "Park home") & (
|
||||
sum(epc_data["built-form"] == estimation_built_form) == 0
|
||||
):
|
||||
epc_data = epc_data[epc_data["property-type"] == estimation_property_type]
|
||||
else:
|
||||
epc_data = epc_data[
|
||||
(epc_data["built-form"] == estimation_built_form) & (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue