summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-11-22 17:32:10 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-11-22 23:30:51 +0800
commit689658456f706be7278fbf50fcde9c7f43cd0655 (patch)
treee3102dc269a9b723757ab67e7e5cb418012a832f
parent418947b6ce3da1c62b6449c4782d3e979eb82a07 (diff)
downloadgitlab-ce-689658456f706be7278fbf50fcde9c7f43cd0655.tar.gz
Cache allowed_ids
-rw-r--r--lib/gitlab/cycle_analytics/base_event_fetcher.rb2
1 files changed, 1 insertions, 1 deletions
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