lib/scrivito/basic_obj.rb in scrivito_sdk-0.71.1 vs lib/scrivito/basic_obj.rb in scrivito_sdk-0.71.2

- old
+ new

@@ -1027,11 +1027,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 @@ -1106,10 +1106,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 def reset_blank_attributes(attributes) widget_pool = attributes['_widget_pool'] widget_pool.each do |id, widget_attributes|