Skip to content

Fix 131 election delete fk conflict 2#145

Merged
jbriones1 merged 6 commits into
mainfrom
fix_131_election-delete-fk-conflict-2
May 19, 2026
Merged

Fix 131 election delete fk conflict 2#145
jbriones1 merged 6 commits into
mainfrom
fix_131_election-delete-fk-conflict-2

Conversation

@kathryntanardy
Copy link
Copy Markdown
Contributor

@kathryntanardy kathryntanardy commented May 14, 2026

Fix: Return 409 on election delete conflict
closes #131

Issue: Deleting an election with linked nominee applications failed.

Cause: election_nominee_application references election.slug via FK.

Fix: Checked whether a nominee application depends on the election. If yes, raise an 409 error.

Comment thread src/elections/urls.py Outdated
Copy link
Copy Markdown
Contributor

@jbriones1 jbriones1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for the changes!

@jbriones1 jbriones1 merged commit 324a299 into main May 19, 2026
3 checks passed
@jbriones1 jbriones1 deleted the fix_131_election-delete-fk-conflict-2 branch May 19, 2026 21:35
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.

Deleting an Election with Candidates fails

2 participants