From be5126ee13ccef8c1e84d1d8be2723dbfc3b5e7d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 16 Jul 2016 09:52:04 +0000 Subject: [PATCH] Don't pass conditions to #destroy_all. git-svn-id: http://svn.redmine.org/redmine/trunk@15672 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/workflow_permission.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/workflow_permission.rb b/app/models/workflow_permission.rb index 1990b826b..39e2f3bef 100644 --- a/app/models/workflow_permission.rb +++ b/app/models/workflow_permission.rb @@ -46,7 +46,7 @@ class WorkflowPermission < WorkflowRule transaction do permissions.each { |status_id, rule_by_field| rule_by_field.each { |field, rule| - destroy_all(:tracker_id => trackers.map(&:id), :role_id => roles.map(&:id), :old_status_id => status_id, :field_name => field) + where(:tracker_id => trackers.map(&:id), :role_id => roles.map(&:id), :old_status_id => status_id, :field_name => field).destroy_all if rule.present? trackers.each do |tracker| roles.each do |role| -- 2.39.5