mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Merge pull request #956 from Hestia-Homes/feature/dont_drop_postcode
add change and put it to production
This commit is contained in:
commit
25757d9ac8
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