diff --git a/backend/SearchEpc.py b/backend/SearchEpc.py index 701029be..8dde4f8b 100644 --- a/backend/SearchEpc.py +++ b/backend/SearchEpc.py @@ -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) & (