diff --git a/app/models/custom_value.rb b/app/models/custom_value.rb index 4cace724..39ba5999 100644 --- a/app/models/custom_value.rb +++ b/app/models/custom_value.rb @@ -20,7 +20,7 @@ class CustomValue < ActiveRecord::Base belongs_to :customized, :polymorphic => true def after_initialize - if custom_field && new_record? && (customized_type.blank? || (customized && customized.new_record?)) + if new_record? && custom_field && (customized_type.blank? || (customized && customized.new_record?)) self.value ||= custom_field.default_value end end