Skip to content

Fix dev seed crash on school-district org addresses - #2539

Merged
maebeale merged 1 commit into
mainfrom
maebeale/district-not-required
Sep 16, 2026
Merged

maebeale merged 1 commit into
mainfrom
maebeale/district-not-required

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🤖 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 NULL street_address column when an affiliated org had no active address.

  • Populate street_address/city/state/zip_code/locality when building a fresh address, so the district assignment persists.
  • district was already optional (validates :district, length: only) — no field became required.
  • Verified bin/rails db:seed:dev now runs to completion (exit 0).

Closes #2538

🤖 Generated with Claude Code

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
maebeale marked this pull request as ready for review September 15, 2026 16:18
@maebeale
maebeale merged commit 5e1a86d into main Sep 16, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/district-not-required branch September 16, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev seeds error

2 participants