mirror of
https://github.com/redmine/redmine.git
synced 2026-07-27 12:20:55 +02: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:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user