mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-06 09:03:25 +00:00
Don't load changesets when IssuesController#show processes API requests without "include=changesets" (#37528).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@21746 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6b8538929e
commit
6ee209843e
@ -94,7 +94,7 @@ class IssuesController < ApplicationController
|
||||
|
||||
def show
|
||||
@journals = @issue.visible_journals_with_index
|
||||
@has_changesets = @issue.changesets.visible.preload(:repository, :user).exists?
|
||||
@has_changesets = @issue.changesets.visible.preload(:repository, :user).exists? unless api_request?
|
||||
@relations =
|
||||
@issue.relations.
|
||||
select do |r|
|
||||
@ -119,8 +119,10 @@ class IssuesController < ApplicationController
|
||||
end
|
||||
format.api do
|
||||
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
|
||||
@changesets = @issue.changesets.visible.preload(:repository, :user).to_a
|
||||
@changesets.reverse! if User.current.wants_comments_in_reverse_order?
|
||||
if include_in_api_response?('changesets')
|
||||
@changesets = @issue.changesets.visible.preload(:repository, :user).to_a
|
||||
@changesets.reverse! if User.current.wants_comments_in_reverse_order?
|
||||
end
|
||||
end
|
||||
format.atom do
|
||||
render :template => 'journals/index', :layout => false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user