lib/scrivito/basic_obj.rb in scrivito_sdk-0.70.1 vs lib/scrivito/basic_obj.rb in scrivito_sdk-0.70.2

- old
+ new

@@ -1030,11 +1030,11 @@ widget.obj = self end end def as_date(value) - DateAttribute.parse(value) unless value.nil? + DateAttribute.deserialize_from_backend(value) unless value.nil? end def find_blob read_attribute('blob') end @@ -1113,10 +1113,14 @@ SYSTEM_ATTRIBUTES[attribute_name].try(:type) end def value_of_system_attribute(attribute_name) attribute_value = data_from_cms.value_of(attribute_name) - attribute_name == '_last_changed' ? DateAttribute.parse(attribute_value) : attribute_value + if attribute_name == '_last_changed' + DateAttribute.deserialize_from_backend(attribute_value) + else + attribute_value + end end class << self def assert_not_basic_obj(method_name) if self == Scrivito::BasicObj