This is preventing certain users from editing their notification settings and a user has already written in about this bug they are experiencing.
We will most likely need a backfill here to fix the duplicate rows, but should also try to understand how these rows got into the database despite the unique constraint that is placed on the model.
For ~30+ users we have some duplicate rows in the
sentry_notificationsettingprovider
table: https://redash.getsentry.net/queries/6535/sourceThis is leading to
get() returned more than one NotificationSettingProvider
when we try to do updates on notification settings here https://github.com/getsentry/sentry/blob/714fabf11fc03a591f9ddc98dd5ec6561502ea3e/src/sentry/api/endpoints/user_notification_settings_providers.py#L77This is preventing certain users from editing their notification settings and a user has already written in about this bug they are experiencing.
We will most likely need a backfill here to fix the duplicate rows, but should also try to understand how these rows got into the database despite the unique constraint that is placed on the model.