summaryrefslogtreecommitdiffstats
path: root/app/models/issue_status.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/issue_status.rb')
-rw-r--r--app/models/issue_status.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb
index ddff9c005..16c7bce91 100644
--- a/app/models/issue_status.rb
+++ b/app/models/issue_status.rb
@@ -25,8 +25,8 @@ class IssueStatus < ActiveRecord::Base
validates_length_of :name, :maximum => 30
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
- def before_save
- IssueStatus.update_all "is_default=#{connection.quoted_false}" if self.is_default?
+ def after_save
+ IssueStatus.update_all("is_default=#{connection.quoted_false}", ['id <> ?', id]) if self.is_default?
end
# Returns the default status for new issues