summaryrefslogtreecommitdiff
path: root/app/models/notification_setting.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 18:08:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 18:08:47 +0000
commit6b9d3a4e8351e662c4586b24bb152de78ae9e3bf (patch)
tree883e9db60c047c54418fc1d2b1c5517f97e0f185 /app/models/notification_setting.rb
parent23288f62da73fb0e30d8e7ce306665e8fda1b932 (diff)
downloadgitlab-ce-6b9d3a4e8351e662c4586b24bb152de78ae9e3bf.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/notification_setting.rb')
-rw-r--r--app/models/notification_setting.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/notification_setting.rb b/app/models/notification_setting.rb
index 2b3443f24d7..1447f822513 100644
--- a/app/models/notification_setting.rb
+++ b/app/models/notification_setting.rb
@@ -21,7 +21,10 @@ class NotificationSetting < ApplicationRecord
# pending delete).
#
scope :for_projects, -> do
- includes(:project).references(:projects).where(source_type: 'Project').where.not(projects: { id: nil, pending_delete: true })
+ includes(:project).references(:projects)
+ .where(source_type: 'Project')
+ .where.not(projects: { id: nil })
+ .where.not(projects: { pending_delete: true })
end
EMAIL_EVENTS = [