]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Issue custom fields "required" flag not stored (broken by r1090). Closes ...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 22 Feb 2008 17:48:37 +0000 (17:48 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 22 Feb 2008 17:48:37 +0000 (17:48 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1171 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/custom_field.rb

index 6be081b0be61f9dafdd35cb36c1b1ebe9033de38..990adf9e2ff00b525d83bb3fb6d79395aef17ae9 100644 (file)
@@ -55,7 +55,7 @@ class CustomField < ActiveRecord::Base
     end
     
     # validate default value
-    v = CustomValue.new(:custom_field => self.dup, :value => default_value, :customized => nil)
+    v = CustomValue.new(:custom_field => self.clone, :value => default_value, :customized => nil)
     v.custom_field.is_required = false
     errors.add(:default_value, :activerecord_error_invalid) unless v.valid?
   end