diff --git a/app/models/journal_detail.rb b/app/models/journal_detail.rb index 831f953ae..58239006b 100644 --- a/app/models/journal_detail.rb +++ b/app/models/journal_detail.rb @@ -19,7 +19,7 @@ class JournalDetail < ActiveRecord::Base belongs_to :journal def before_save - self.value = value[0..254] if value - self.old_value = old_value[0..254] if old_value + self.value = value[0..254] if value && value.is_a?(String) + self.old_value = old_value[0..254] if old_value && old_value.is_a?(String) end end