summaryrefslogtreecommitdiff
path: root/app/models/project_team.rb
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2016-07-22 18:42:54 +0200
committerAhmad Sherif <me@ahmadsherif.com>2016-07-22 18:43:41 +0200
commitdf541e510e5da0949286aa73a24ad748bc2d05c6 (patch)
tree979ffd9aac1086227543134dfdcc1e34c9ab9c40 /app/models/project_team.rb
parent033e5423a2594e08a7ebcd2379bd2331f4c39032 (diff)
downloadgitlab-ce-df541e510e5da0949286aa73a24ad748bc2d05c6.tar.gz
Load project invited groups and members eagerly in ProjectTeam#fetch_membersfix/load-project-invited-groups-and-members-eagerly
Diffstat (limited to 'app/models/project_team.rb')
-rw-r--r--app/models/project_team.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project_team.rb b/app/models/project_team.rb
index 0b700930641..9d312a53790 100644
--- a/app/models/project_team.rb
+++ b/app/models/project_team.rb
@@ -173,7 +173,7 @@ class ProjectTeam
invited_members = []
if project.invited_groups.any? && project.allowed_to_share_with_group?
- project.project_group_links.each do |group_link|
+ project.project_group_links.includes(group: [:group_members]).each do |group_link|
invited_group = group_link.group
im = invited_group.members