diff --git a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py index 239fce65..1ba75e2b 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -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)