Merge pull request #956 from Hestia-Homes/feature/dont_drop_postcode

add change and put it to production
This commit is contained in:
Jun-te Kim 2026-04-02 15:31:51 +01:00 committed by GitHub
commit 25757d9ac8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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