Skip to content

fix(_admin): Dedupe GroupSubscription conflicts during user merge#111566

Merged
billyvg merged 1 commit intomasterfrom
billy/feat-admin-unsubscribe-secondary-user-group-issues-merging-accounts
Mar 26, 2026
Merged

fix(_admin): Dedupe GroupSubscription conflicts during user merge#111566
billyvg merged 1 commit intomasterfrom
billy/feat-admin-unsubscribe-secondary-user-group-issues-merging-accounts

Conversation

@billyvg
Copy link
Member

@billyvg billyvg commented Mar 25, 2026

When merging two user accounts, if both users are subscribed to the
same issue group, the unique_together constraint on GroupSubscription
causes an IntegrityError. Add dedupe logic matching the existing
GroupSeen pattern: delete the secondary user's conflicting
subscriptions before reassigning the remaining ones.

Fixes SENTRY-4YFH
Fixes SENTRY-5HVP

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

When merging two user accounts, if both users are subscribed to the
same issue group, the unique_together constraint on GroupSubscription
causes an IntegrityError. Add dedupe logic matching the existing
GroupSeen pattern: delete the secondary user's conflicting
subscriptions before reassigning the remaining ones.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 25, 2026
@billyvg billyvg changed the title fix(merge): Dedupe GroupSubscription conflicts during user merge fix(_admin): Dedupe GroupSubscription conflicts during user merge Mar 25, 2026
@billyvg billyvg marked this pull request as ready for review March 25, 2026 21:11
@billyvg billyvg requested a review from a team as a code owner March 25, 2026 21:11
@billyvg billyvg merged commit e7130a6 into master Mar 26, 2026
72 of 73 checks passed
@billyvg billyvg deleted the billy/feat-admin-unsubscribe-secondary-user-group-issues-merging-accounts branch March 26, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants