BigW Consortium Gitlab

Commit 8c195b39 by Tiago

Merge branch 'revert-n-plus-1-fix-in-events' into '10-3-stable'

Reverting https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15788 See merge request gitlab-org/gitlab-ce!16088
parents 3e7f36da 3b5eab3c
......@@ -72,7 +72,7 @@ class Event < ActiveRecord::Base
# We're using preload for "push_event_payload" as otherwise the association
# is not always available (depending on the query being built).
includes(:author, :project, project: :namespace)
.preload(:push_event_payload, target: :author)
.preload(:target, :push_event_payload)
end
scope :for_milestone_id, ->(milestone_id) { where(target_type: "Milestone", target_id: milestone_id) }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment