mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
Fix N+1 query in Wiki history page by preloading the author of each Wiki content version (#42933).
Patch by [Agileware]Kota Uchino (user:uchinokot). git-svn-id: https://svn.redmine.org/redmine/trunk@23847 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
928f57073e
commit
8cc3e1a5ac
@ -240,6 +240,7 @@ class WikiController < ApplicationController
|
||||
# don't load text
|
||||
@versions = @page.content.versions.
|
||||
select("id, author_id, comments, updated_on, version").
|
||||
preload(:author).
|
||||
reorder('version DESC').
|
||||
limit(@version_pages.per_page + 1).
|
||||
offset(@version_pages.offset).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user