summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-04-02 22:50:45 -0700
committerStan Hu <stanhu@gmail.com>2017-04-02 22:50:45 -0700
commitcef8a19c12f8d4c80d4c525d524865cf6da999a9 (patch)
tree90b551d79dafd6fe11cf392de2f283642f948bc2
parente7e9307219d1c81427f95444b36471c519dc06c2 (diff)
downloadgitlab-ce-sh-eager-load-project-labels-in-milestone.tar.gz
Eager load to avoid N+1 queries when there are labels from multiple projects in a milestonesh-eager-load-project-labels-in-milestone
Found by Bullet in !10263 in https://gitlab.com/gitlab-org/gitlab-ce/builds/13490762
-rw-r--r--app/views/shared/milestones/_tabs.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/shared/milestones/_tabs.html.haml b/app/views/shared/milestones/_tabs.html.haml
index 9a4502873ef..806e9e7796e 100644
--- a/app/views/shared/milestones/_tabs.html.haml
+++ b/app/views/shared/milestones/_tabs.html.haml
@@ -40,4 +40,4 @@
.tab-pane#tab-participants
= render 'shared/milestones/participants_tab', users: milestone.participants
.tab-pane#tab-labels
- = render 'shared/milestones/labels_tab', labels: milestone.labels
+ = render 'shared/milestones/labels_tab', labels: milestone.labels.includes(:project)