mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added a simple check to see if the property is a mid floor flat
This commit is contained in:
parent
e139031e6b
commit
a1175c04a8
2 changed files with 11 additions and 5 deletions
|
|
@ -858,6 +858,14 @@ class Property:
|
|||
self.floor_level = 1
|
||||
return
|
||||
|
||||
def is_mid_floor_flat(self):
|
||||
"""
|
||||
Simple utility function to check if the property is a mid-floor flat
|
||||
:return:
|
||||
"""
|
||||
|
||||
return self.data["property-type"] == "Flat" and self.epc_record.original_epc["floor-level"] == "mid floor"
|
||||
|
||||
def set_wall_type(self):
|
||||
"""
|
||||
This method sets the wall type of the property, using a simple approach based on the wall description
|
||||
|
|
|
|||
|
|
@ -145,9 +145,7 @@ class Mds:
|
|||
if (
|
||||
self.property_instance.roof["is_pitched"] and
|
||||
not self.roof_recommender.is_loft_already_insulated()
|
||||
):
|
||||
self.property_instance.data
|
||||
|
||||
) or self.property_instance.is_mid_floor_flat():
|
||||
pruned_measures.append(measure)
|
||||
continue
|
||||
|
||||
|
|
@ -156,7 +154,7 @@ class Mds:
|
|||
if (
|
||||
self.property_instance.floor["is_solid"] and
|
||||
self.property_instance.floor["insulation_thickness"] not in ["average", "above average"]
|
||||
):
|
||||
) or self.property_instance.is_mid_floor_flat():
|
||||
pruned_measures.append(measure)
|
||||
continue
|
||||
|
||||
|
|
@ -165,7 +163,7 @@ class Mds:
|
|||
if (
|
||||
self.property_instance.floor["is_suspended"] and
|
||||
self.property_instance.floor["insulation_thickness"] not in ["average", "above average"]
|
||||
):
|
||||
) or self.property_instance.is_mid_floor_flat():
|
||||
pruned_measures.append(measure)
|
||||
continue
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue