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 f1709d6e..95ca3901 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -518,6 +518,17 @@ class DataLoader: df = df[df["matching_address"].str.contains(str(house_number))] if df.empty: + + postcode_lower = row["Post Code"].lower() + if postcode_lower in missed_postcodes: + matching_lookup.append( + { + "survey_list_row_id": row["survey_list_row_id"], + "asset_list_row_id": None, + } + ) + continue + print(row["Street / Block Name"]) print(house_number) print(row["Post Code"]) @@ -546,16 +557,6 @@ class DataLoader: df = df.iloc[best_match_index:best_match_index + 1] if df.shape[0] != 1: - postcode_lower = row["Post Code"].lower() - if postcode_lower in missed_postcodes: - matching_lookup.append( - { - "survey_list_row_id": row["survey_list_row_id"], - "asset_list_row_id": None, - } - ) - continue - print(row["Street / Block Name"]) print(house_number) print(row["Post Code"])