remove unneeded Relation#all from Issue#workflow_rule_by_attribute

git-svn-id: http://svn.redmine.org/redmine/trunk@13000 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-03-24 16:00:01 +00:00
parent 5fb5bd0b11
commit 4a9d04a767
1 changed files with 1 additions and 1 deletions

View File

@ -524,7 +524,7 @@ class Issue < ActiveRecord::Base
return {} if roles.empty?
result = {}
workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id)).all
workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id))
if workflow_permissions.any?
workflow_rules = workflow_permissions.inject({}) do |h, wp|
h[wp.field_name] ||= []