modify the code to solve the undefined problem in issue.rb
This commit is contained in:
parent
68fe31914d
commit
d940d5eb1d
|
@ -645,7 +645,7 @@ class Issue < ActiveRecord::Base
|
|||
|
||||
user_real = user || User.current
|
||||
roles = user_real.admin ? Role.all : user_real.roles_for_project(project)
|
||||
return {} if roles.empty?
|
||||
return {} if roles.length == 0
|
||||
|
||||
result = {}
|
||||
workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id)).all
|
||||
|
|
Loading…
Reference in New Issue