fixing eligibility

This commit is contained in:
Khalim Conn-Kowlessar 2024-02-26 23:30:06 +00:00
parent 281c6f626c
commit f4d27aa68d

View file

@ -421,8 +421,19 @@ class Eligibility:
}
return
# Case 3 - cavity is suitable, loft is within 150mm, sap is good
if self.cavity["suitability"] and (self.loft["thickness"] <= 150) and (current_sap < 55):
self.eco4_warmfront = {
"eligible": True,
"strict": False,
"message": "Meets cavity, loft borderline, meets sap",
"cavity_type": self.cavity["type"],
"loft_type": self.loft["thickness_classification"]
}
return
# Case 3 - cavity is suitable, loft is not, sap is good
if self.cavity["suitability"] and (self.loft["thickness"] > 100) and (current_sap < 55):
if self.cavity["suitability"] and (self.loft["thickness"] > 150) and (current_sap < 55):
self.eco4_warmfront = {
"eligible": True,
"strict": False,
@ -444,7 +455,7 @@ class Eligibility:
return
# Case 5 - cavity and loft suitable, sap too high
if self.cavity["suitability"] and (self.loft["thickness"] <= 100) and (current_sap >= 55):
if self.cavity["suitability"] and (self.loft["thickness"] <= 150) and (current_sap >= 55):
self.eco4_warmfront = {
"eligible": True,
"strict": False,
@ -470,7 +481,7 @@ class Eligibility:
self.eco4_warmfront = {
"eligible": False,
"strict": False,
"message": "Fails cavity nd lodt, meets SAP",
"message": "Fails cavity and loft, meets SAP",
"cavity_type": self.cavity["type"],
"loft_type": self.loft["thickness_classification"]
}