mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
add change and put it to production
This commit is contained in:
parent
8d5115b6e8
commit
53ef72faab
1 changed files with 9 additions and 0 deletions
|
|
@ -462,6 +462,15 @@ def handler(event, context, local=False):
|
|||
# Validate postcode before processing
|
||||
if not AddressMatch.is_valid_postcode(postcode):
|
||||
logger.warning(f"Postcode {postcode} is invalid, skipping")
|
||||
for row in postcode_rows:
|
||||
results_data.append(
|
||||
{
|
||||
**row,
|
||||
"address2uprn_uprn": "invalid postcode",
|
||||
"address2uprn_address": "invalid postcode",
|
||||
"address2uprn_lexiscore": "invalid postcode",
|
||||
}
|
||||
)
|
||||
continue
|
||||
|
||||
# Fetch EPC data once per postcode
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue