Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5d6fea1b
Commit
5d6fea1b
authored
Dec 22, 2017
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted fix
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15788
parent
77d190b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
6 deletions
+1
-6
app/models/event.rb
app/models/event.rb
+1
-1
changelogs/unreleased/fix-event-target-author-preloading.yml
changelogs/unreleased/fix-event-target-author-preloading.yml
+0
-5
No files found.
app/models/event.rb
View file @
5d6fea1b
...
...
@@ -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
)
}
...
...
changelogs/unreleased/fix-event-target-author-preloading.yml
deleted
100644 → 0
View file @
77d190b4
---
title
:
Fix N+1 query when displaying events
merge_request
:
author
:
type
:
performance
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment