1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 01:11:12 +00:00

Use 2 queries that use an index.

git-svn-id: http://svn.redmine.org/redmine/trunk@16483 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2017-04-04 18:03:49 +00:00
parent fbde611f3f
commit 3a4ce13b42

View File

@ -116,6 +116,7 @@ class IssueStatus < ActiveRecord::Base
# Deletes associated workflows
def delete_workflow_rules
WorkflowRule.where(["old_status_id = :id OR new_status_id = :id", {:id => id}]).delete_all
WorkflowRule.where(:old_status_id => id).delete_all
WorkflowRule.where(:new_status_id => id).delete_all
end
end