modify the code to solve the undefined problem in issue.rb

This commit is contained in:
Nigel 2019-09-21 21:25:29 +08:00
parent 68fe31914d
commit d940d5eb1d
1 changed files with 1 additions and 1 deletions

View File

@ -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