From d562324dd906c8c8ab49ac27845c3c4faac4da12 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 2 Jul 2024 12:22:35 +0100 Subject: [PATCH] skip cases with no candidates --- etl/bill_savings/data_collection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etl/bill_savings/data_collection.py b/etl/bill_savings/data_collection.py index 26ed156e..521a3783 100644 --- a/etl/bill_savings/data_collection.py +++ b/etl/bill_savings/data_collection.py @@ -83,7 +83,8 @@ def retrieve_find_my_epc_data(uprn: int, postcode: str, address: str, expected_e return None if not extracted_table: - raise Exception("Fix me") + print("No candidates found, skipping for now") + return None chosen_epc = BASE_ENERGY_URL + extracted_table[0]['extracted_address_url'] epc_certificate = chosen_epc.split('/')[-1]