diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-04 18:03:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-04 18:03:49 +0000 |
commit | 3a4ce13b42a6bbdc2f8156a8f23bc2c6c2d5a498 (patch) | |
tree | 94460ea9b9982f0e5ea3bdb3c654dfe09d75139c /app/models/issue_status.rb | |
parent | fbde611f3f4eb681cffaaab76ab8761d0053a85e (diff) | |
download | redmine-3a4ce13b42a6bbdc2f8156a8f23bc2c6c2d5a498.tar.gz redmine-3a4ce13b42a6bbdc2f8156a8f23bc2c6c2d5a498.zip |
Use 2 queries that use an index.
git-svn-id: http://svn.redmine.org/redmine/trunk@16483 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_status.rb')
-rw-r--r-- | app/models/issue_status.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb index 1a1beaf1c..a3f194247 100644 --- a/app/models/issue_status.rb +++ b/app/models/issue_status.rb @@ -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 |