Prevent N queries on custom_fields when call /issues API.

git-svn-id: http://svn.redmine.org/redmine/trunk@12913 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-02-22 11:23:39 +00:00
parent 411ddaf701
commit 9733194cce
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ class Issue < ActiveRecord::Base
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
def available_custom_fields
(project && tracker) ? (project.all_issue_custom_fields & tracker.custom_fields.all) : []
(project && tracker) ? (project.all_issue_custom_fields & tracker.custom_fields) : []
end
def visible_custom_field_values(user=nil)