From 39d293abd2ec135c53448552d482d17f9726701c Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 19 Nov 2017 15:25:48 -0800 Subject: Omit the `all` call after Project#project_group_links to avoid unnecessary loads --- lib/api/entities.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/entities.rb b/lib/api/entities.rb index ce332fe85d2..ca7708e366e 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -156,7 +156,7 @@ module API expose :public_builds, as: :public_jobs expose :ci_config_path expose :shared_with_groups do |project, options| - SharedGroup.represent(project.project_group_links.all, options) + SharedGroup.represent(project.project_group_links, options) end expose :only_allow_merge_if_pipeline_succeeds expose :request_access_enabled -- cgit v1.2.1