lib/ecoportal/api/v1/person.rb in ecoportal-api-0.5.7 vs lib/ecoportal/api/v1/person.rb in ecoportal-api-0.5.8

- old
+ new

@@ -54,10 +54,10 @@ raise "Invalid filter tag #{tag.inspect}" end tag.upcase end - ini_tags = original_doc["filter_tags"] || [] + ini_tags = (original_doc && original_doc["filter_tags"]) || [] # preserve original order to avoid false updates doc["filter_tags"] = (ini_tags & end_tags) + (end_tags - ini_tags) end def as_json