diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/workflows_controller.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 06ae30e2e..24bd5c528 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -88,7 +88,6 @@ class WorkflowsController < ApplicationController end def copy - if params[:source_tracker_id].blank? || params[:source_tracker_id] == 'any' @source_tracker = nil else @@ -99,10 +98,10 @@ class WorkflowsController < ApplicationController else @source_role = Role.find_by_id(params[:source_role_id].to_i) end - - @target_trackers = params[:target_tracker_ids].blank? ? nil : Tracker.find_all_by_id(params[:target_tracker_ids]) - @target_roles = params[:target_role_ids].blank? ? nil : Role.find_all_by_id(params[:target_role_ids]) - + @target_trackers = params[:target_tracker_ids].blank? ? + nil : Tracker.where(:id => params[:target_tracker_ids]).all + @target_roles = params[:target_role_ids].blank? ? + nil : Role.where(:id => params[:target_role_ids]) if request.post? if params[:source_tracker_id].blank? || params[:source_role_id].blank? || (@source_tracker.nil? && @source_role.nil?) flash.now[:error] = l(:error_workflow_copy_source) |