summaryrefslogtreecommitdiff
path: root/app/mailers/emails/members.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-08-11 15:19:11 +0100
committerNick Thomas <nick@gitlab.com>2017-08-14 12:47:15 +0100
commitd7b03c37f8346e29f21f0196fd3a532effa60ec3 (patch)
treedae0a75f4dd508f2531788247d8bac88e0484162 /app/mailers/emails/members.rb
parent455dc74e65e7461c1a51bf3ea6594fe20b9df90c (diff)
downloadgitlab-ce-d7b03c37f8346e29f21f0196fd3a532effa60ec3.tar.gz
Speed up Group#user_ids_for_project_authorizations
Diffstat (limited to 'app/mailers/emails/members.rb')
-rw-r--r--app/mailers/emails/members.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/mailers/emails/members.rb b/app/mailers/emails/members.rb
index 7b617b359ea..d76c61c369f 100644
--- a/app/mailers/emails/members.rb
+++ b/app/mailers/emails/members.rb
@@ -11,11 +11,11 @@ module Emails
@member_source_type = member_source_type
@member_id = member_id
- admins = member_source.members.owners_and_masters.includes(:user).pluck(:notification_email)
+ admins = member_source.members.owners_and_masters.pluck(:notification_email)
# A project in a group can have no explicit owners/masters, in that case
# we fallbacks to the group's owners/masters.
if admins.empty? && member_source.respond_to?(:group) && member_source.group
- admins = member_source.group.members.owners_and_masters.includes(:user).pluck(:notification_email)
+ admins = member_source.group.members.owners_and_masters.pluck(:notification_email)
end
mail(to: admins,