diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-07-22 19:42:54 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-07-22 19:43:41 +0300 |
commit | df541e510e5da0949286aa73a24ad748bc2d05c6 (patch) | |
tree | 979ffd9aac1086227543134dfdcc1e34c9ab9c40 | |
parent | 033e5423a2594e08a7ebcd2379bd2331f4c39032 (diff) |
Load project invited groups and members eagerly in ProjectTeam#fetch_members
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/models/project_team.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index e2104338f5c..fa272755033 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ v 8.11.0 (unreleased) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' - Limit git rev-list output count to one in forced push check - Retrieve rendered HTML from cache in one request + - Load project invited groups and members eagerly in ProjectTeam#fetch_members v 8.10.0 - Fix profile activity heatmap to show correct day name (eanplatter) 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 |