Repository navigation
Add a nullable address to sections and expose it - #282
Merged
Merged
Conversation
sections.address holds a section's street address. Abroad sections need it: their place is the committee name (Посолство, Баркинг 2), and the addresses from the МВнР table lived only in the new site's code. GET /sections?town=, GET /sections/:id and /results/<section>.json now return address: the column when set, else place for a domestic section, else null for an abroad one (never the committee name).
This was referenced Oct 26, 2026
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.
Step 2 of moving the abroad section addresses out of the site and into the API (site PR #182 had to ship code for a single address change in Tromsø).
1792510000000-AddSectionAddress:ALTER TABLE sections ADD COLUMN IF NOT EXISTS address text NULL. No data changes.Section.addressandsectionAddress(): the column when set; otherwiseplacefor a domestic section (domesticplacealready holds the address);nullfor an abroad section, never its committee name („Посолство“).addressis now returned byGET /sections?town=,GET /sections/:idand/results/<section>.json.Tests:
section-address.spec.ts,section.dto.spec.ts. The full suite also passes with the DB specs against postgres:13 (TEST_DATABASE_URL).Next: the next PR adds
GET /sections/abroadandPATCH /sections/abroad/addresses.