summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-10-05 08:04:12 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-10-05 08:04:12 +0000
commit3c8ccd2eda593205de8edde5102249372a1ed3a2 (patch)
tree47f05dea2c7137a9ab11710845fdfa85ec5cbff5 /app
parent77d56c931af073ffb6583819bb216225456cb231 (diff)
parent7cb2755617a2f29498f4523b8915bc77abcae4df (diff)
downloadgitlab-ce-3c8ccd2eda593205de8edde5102249372a1ed3a2.tar.gz
Merge branch 'mao/48221-issues_show_sql_count' into 'master'
Banzai label ref finder - minimize SQL calls by sharing context more aggresively Closes #48221 See merge request gitlab-org/gitlab-ce!22070
Diffstat (limited to 'app')
-rw-r--r--app/finders/labels_finder.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/labels_finder.rb b/app/finders/labels_finder.rb
index 82e0b2ed9e1..d000af21be3 100644
--- a/app/finders/labels_finder.rb
+++ b/app/finders/labels_finder.rb
@@ -129,7 +129,7 @@ class LabelsFinder < UnionFinder
end
def project?
- params[:project_id].present?
+ params[:project].present? || params[:project_id].present?
end
def projects?
@@ -152,7 +152,7 @@ class LabelsFinder < UnionFinder
return @project if defined?(@project)
if project?
- @project = Project.find(params[:project_id])
+ @project = params[:project] || Project.find(params[:project_id])
@project = nil unless authorized_to_read_labels?(@project)
else
@project = nil