Fix dev seed crash on school-district org addresses - #2539
Merged
Merged
Conversation
The school-district seed built a bare address and update!'d only the district, tripping the address presence validations and the NOT NULL street_address column when an affiliated org had no active address. Populate the required fields on build so the district assignment persists. Closes #2538 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
marked this pull request as ready for review
September 15, 2026 16:18
jmilljr24
approved these changes
Sep 15, 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.
🤖 suggested review level: 3 Read 📖 one-line seed fix, no app logic changed
Dev seeds (
db:seed:dev) crashed after #2534 because the school-district pass built a bare org address and saved only the district — hitting the address presence validations and the NOT NULLstreet_addresscolumn when an affiliated org had no active address.street_address/city/state/zip_code/localitywhen building a fresh address, so the district assignment persists.districtwas already optional (validates :district, length:only) — no field became required.bin/rails db:seed:devnow runs to completion (exit 0).Closes #2538
🤖 Generated with Claude Code