From 2810316e22ffe4662ae40c2c3bb9bee2f6af6f83 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Sun, 10 Mar 2024 17:14:22 +0000 Subject: [PATCH] handled bug for HA30 --- etl/eligibility/ha_15_32/ha_analysis_batch_3.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 71062b16..1ee40dde 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -2566,6 +2566,7 @@ class DataLoader: "eco4(subject to ciga)": "eco4 (subject to ciga)", "eco4 subject to ciga": "eco4 (subject to ciga)", "eco4 (subject to archetype/ciga)": "eco4 (subject to ciga) (subject to archetype)", + "eco4( subject to ciga/archetype)": "eco4 (subject to ciga) (subject to archetype)", } ha_facts_and_figures = [] @@ -2716,11 +2717,13 @@ class DataLoader: asset_list = asset_list.merge(survey_list_to_merge, how='left', on="asset_list_row_id") # Update the cases where properties have sold, but are missing a CIGA check + # If we don't have a CIGA list, we set the value to ECO4 + set_to = "eco4 - passed ciga" if not ciga_list.empty else "eco4" asset_list["ECO Eligibility"] = np.where( (asset_list["ECO Eligibility"].str.contains("subject to ciga")) & ( asset_list["has_a_survey_record"] == True ), - "eco4 - passed ciga", + set_to, asset_list["ECO Eligibility"] ) # Update the cases where a property has been marked as eligible for GBIS, but sold for ECO4 @@ -4122,7 +4125,6 @@ def calculate_eco4_post_ciga( eco4_expected_cancellations = eco4_no_ciga_needed_cancellations + eco4_ciga_needed_cancellations else: - eco4_confirmed_ciga_failures = 0 # Multiply by sale conversion eco4_confirmed = np.round(eco4_no_ciga_needed * ha_eco4_to_sale_rate)