From c85f9c5b1d320f7a6f75e3d08bbafd2fb20d3f58 Mon Sep 17 00:00:00 2001 From: Francisco Lopez Date: Fri, 24 Nov 2017 17:37:02 +0100 Subject: Code review comments applied --- lib/api/groups.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/api') diff --git a/lib/api/groups.rb b/lib/api/groups.rb index 05443329a32..83c7898150a 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -64,8 +64,8 @@ module API forked_from_project: [:route, :forks, namespace: :route, tags: :taggings]) projects = reorder_projects(projects) projects = paginate(projects) - projects_with_fork = projects + projects.map(&:forked_from_project).compact - ::Projects::BatchForksCountService.new(projects_with_fork).refresh_cache + projects_with_forks = projects + projects.map(&:forked_from_project).compact + ::Projects::BatchForksCountService.new(projects_with_forks).refresh_cache ::Projects::BatchOpenIssuesCountService.new(projects).refresh_cache projects end -- cgit v1.2.1