handled bug for HA30

This commit is contained in:
Khalim Conn-Kowlessar 2024-03-10 17:14:22 +00:00
parent cd81c2b0b2
commit 2810316e22

View file

@ -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)