Commit c2785e38 authored by jplang's avatar jplang

Use 2 queries that use an index.

git-svn-id: https://svn.redmine.org/redmine/trunk@16483 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1bed1224
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment