]> source.dussan.org Git - redmine.git/commitdiff
Don't pass conditions to #destroy_all.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 16 Jul 2016 09:52:04 +0000 (09:52 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 16 Jul 2016 09:52:04 +0000 (09:52 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15672 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/workflow_permission.rb

index 1990b826b415d5ce5e5f8bd9cb84fc0bd804034d..39e2f3befd8dda2591c09bf0db6a57bfedd3fe0d 100644 (file)
@@ -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|