mirror of
https://github.com/redmine/redmine.git
synced 2026-03-21 11:52:07 +01: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user