lib/eco/api/common/people/person_entry.rb in eco-helpers-1.0.2 vs lib/eco/api/common/people/person_entry.rb in eco-helpers-1.0.3
- old
+ new
@@ -319,10 +319,14 @@
serial_attrs = @person_parser.defined_attrs.reduce({}) do |serial_hash, attr|
deps = @deps[attr] || {}
serial_attr = @person_parser.serialize(attr, @person, deps: deps)
serial_hash.merge(hash_attr(attr, serial_attr))
end
- unserialized_entry.merge(serial_attrs)
+ unserialized_entry.merge(serial_attrs).tap do |hash|
+ if hash.key?("filter_tags") && hash["filter_tags"].is_a?(Array)
+ hash["filter_tags"] = @person_parser.serialize(:multiple, hash["filter_tags"])
+ end
+ end
end
# To obtain an entry with internal names but external values.
# @param data [Hash, Ecoportal::API::V1::Person] alised_entry (when parsing) or person (when serializing).
# @return [Hash] the `internal entry` with the **internal** attributes names and values.