lib/fiona7/builder/obj_builder.rb in infopark_fiona7-0.70.0.3 vs lib/fiona7/builder/obj_builder.rb in infopark_fiona7-0.71.0.0
- old
+ new
@@ -115,11 +115,11 @@
end
@values.each do |attribute_name, possible_pair|
(claimed_type, value) = *possible_pair
attribute = type_definition.find_attribute(attribute_name)
if attribute.nil?
- debugger
+ #debugger
raise "Attribute #{attribute_name} not found in #{@obj_class}"
end
virtual_name = attribute.name.to_sym
attribute_name = real_name = attribute.real_name.to_sym
@@ -213,10 +213,14 @@
when :text, :string, :enum, :multienum, :date
#if value.nil? && value != @obj[attribute_name]
@obj.set(attribute_name.to_s, value)
#end
when :stringlist
- @obj.set(attribute_name.to_s, value.to_json)
+ if Fiona7.mode == :legacy && attribute_name.to_s == "channels"
+ @obj.set(:channels, value || [])
+ else
+ @obj.set(attribute_name.to_s, value.to_json)
+ end
when :html
converted_links = LinkConverter::ScrivitoToFiona.new(WriteObj, value.to_s).convert
@obj.set(attribute_name.to_s, converted_links)
when :binary
if value.kind_of?(String)