summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-29 21:09:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-29 21:09:44 +0000
commit8d5f932660f96367948fb89210f7a04d3fc90891 (patch)
tree9a145b22c3c932d61a3a073a105c0da48410956d /app/models
parentcd6db6a3cbe43880eca4eec8c967fb78d95a2926 (diff)
downloadredmine-8d5f932660f96367948fb89210f7a04d3fc90891.tar.gz
redmine-8d5f932660f96367948fb89210f7a04d3fc90891.zip
Do not validate blank default custom field value.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8722 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/custom_field.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index f56eb3623..b8005fea1 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -57,7 +57,7 @@ class CustomField < ActiveRecord::Base
end
end
- unless valid_field_value?(default_value)
+ if default_value.present? && !valid_field_value?(default_value)
errors.add(:default_value, :invalid)
end
end