diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-12-12 13:32:39 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-12-12 13:32:39 +0000 |
commit | c6511849987c695057c395f10736b54e565461ee (patch) | |
tree | 6b65e503f1850fc78da459bc68e034cf80b2c56c /app/models/enumeration.rb | |
parent | 72d0843c1fefedd44742a2d7e05ce46047d17b93 (diff) | |
download | redmine-c6511849987c695057c395f10736b54e565461ee.tar.gz redmine-c6511849987c695057c395f10736b54e565461ee.zip |
Fixed: default flag removed when editing a default enumeration (#2327).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2123 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/enumeration.rb')
-rw-r--r-- | app/models/enumeration.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb index d32a0c049..e4b080be1 100644 --- a/app/models/enumeration.rb +++ b/app/models/enumeration.rb @@ -44,7 +44,9 @@ class Enumeration < ActiveRecord::Base end def before_save - Enumeration.update_all("is_default = #{connection.quoted_false}", {:opt => opt}) if is_default? + if is_default? && is_default_changed? + Enumeration.update_all("is_default = #{connection.quoted_false}", {:opt => opt}) + end end def objects_count |