fixing eligibility

This commit is contained in:
Khalim Conn-Kowlessar 2024-02-26 23:36:45 +00:00
parent f4d27aa68d
commit 97ce8dc32e

View file

@ -1114,7 +1114,7 @@ def get_epc_data(
results = []
scoring_data = []
nodata = []
for index, property_meta in tqdm(eco4.iterrows(), total=len(eco4)):
for index, property_meta in tqdm(asset_list.iterrows(), total=len(asset_list)):
if property_meta["matching_postcode"] is None:
continue
@ -1218,10 +1218,7 @@ def get_epc_data(
# Loft MUST be suitable
cavity_age = None
if (
eligibility.walls["is_cavity_wall"] and
eligibility.walls["is_filled_cavity"] and
eligibility.loft["suitability"] and
eligibility.eco4_warmfront["message"] == "Failed due to full cavity - check cavity age"
identified_for_eco4 and not eligibility.eco4_warmfront["eligible"]
):
# We check the age of the cavity and if it's particularly old, we flag it
cavity_age = calculate_cavity_age(newest_epc, older_epcs, cleaned)