Fixed: Issue custom fields "required" flag not stored (broken by r1090). Closes #715.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1171 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-02-22 17:48:37 +00:00
parent b935aebd99
commit b0bb41ad35
1 changed files with 1 additions and 1 deletions

View 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