diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-02-24 16:56:34 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-02-24 20:15:39 -0300 |
commit | 1286151578af69e88d267d0dc3294ef1ed0062c2 (patch) | |
tree | b499dae9f7b82f6b956745c6e75e380e8422798d /app/models | |
parent | 2fb3fcf0c0446c9a1568e26e81d49f3b5ce159dc (diff) | |
download | gitlab-ce-1286151578af69e88d267d0dc3294ef1ed0062c2.tar.gz |
Add performance query regression fix for !9088 affecting #2726727267-events-project-query-performance-regression
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/event.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index 4b8eac9accf..d7ca8e3c599 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -36,7 +36,7 @@ class Event < ActiveRecord::Base scope :code_push, -> { where(action: PUSHED) } scope :in_projects, ->(projects) do - where(project_id: projects).recent + where(project_id: projects.pluck(:id)).recent end scope :with_associations, -> { includes(:author, :project, project: :namespace).preload(:target) } |