fix: handle null county names for pseudo-county areas#1364
Merged
Conversation
Normalise NULL results from array_agg (when no source rows pass the FILTER clause) into empty arrays. Outcodes contract is string[], never null — this ensures the types match the runtime behaviour when pseudo-county areas produce no names to aggregate.
Postcode admin_county is now nullable (null when county GSS is pseudo). Outcode admin_county is empty array (coalesced from null aggregates). Update schemas and descriptions to clarify the new behaviour.
Postcode admin_county now null (was pseudo string). Outcode admin_county now empty array (was array with pseudo string). Update test expectations to match the new contract.
Regenerated test seed (test/seed/seed.sql.gz) from latest upstream dump which now sets admin_county to null when the underlying GSS code is a pseudo (e.g. S99999999 for Scotland). The GSS code itself remains in codes.admin_county for reference. This fixes the postcode/outcode contract mismatch where names were showing '(pseudo) Scotland' instead of null.
The admin_county example was an empty string, contradicting the nullable contract and the pseudo-county null behaviour. Set it to null and regenerate the static OpenAPI specs and API reference docs.
Member
|
🎉 This issue has been resolved in version 19.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan