Skip to content

Exclude projects pending delete from notifications

What does this MR do?

Make NotificationSetting.for_projects exclude projects that are excluded by the default scope on Project. (At the moment, that's projects with pending_delete: true.)

Are there points in the code the reviewer needs to double check?

We could do the join and filtering manually, but I wanted to use the default scope in case that changes in future. It might be a bit verbose for what it does.

Why was this MR needed?

If you have a notification setting for a project that is pending_delete: true, you can't view your notification settings.

What are the relevant issue numbers?

https://gitlab.com/gitlab-com/support-forum/issues/819

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

Merge request reports