From 689658456f706be7278fbf50fcde9c7f43cd0655 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 22 Nov 2017 17:32:10 +0800 Subject: Cache allowed_ids --- lib/gitlab/cycle_analytics/base_event_fetcher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/cycle_analytics/base_event_fetcher.rb b/lib/gitlab/cycle_analytics/base_event_fetcher.rb index 62fc3ee3b5f..e3e3767cc75 100644 --- a/lib/gitlab/cycle_analytics/base_event_fetcher.rb +++ b/lib/gitlab/cycle_analytics/base_event_fetcher.rb @@ -56,7 +56,7 @@ module Gitlab end def allowed_ids - allowed_ids_finder_class + @allowed_ids ||= allowed_ids_finder_class .new(@options[:current_user], project_id: @project.id) .execute.where(id: event_result_ids).pluck(:id) end -- cgit v1.2.1