Skip to content

Commit

Permalink
Prevent metadata duplication (#969)
Browse files Browse the repository at this point in the history
When the term Identifier is part of the metadata and used as source_identifier,
it resulted in the value getting put into the metadata twice. Calling uniq!
on the array removes any duplicate metadata, as there should never be a reason
for the same metadata to be on a record twice.
  • Loading branch information
laritakr authored Aug 19, 2024
1 parent d24864e commit afb03ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/concerns/bulkrax/has_matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def set_parsed_data(name, value)

parsed_metadata[name] ||= []
parsed_metadata[name] += Array.wrap(value).flatten
parsed_metadata[name].uniq!
end

def set_parsed_object_data(object_multiple, object_name, name, index, value)
Expand Down

0 comments on commit afb03ed

Please sign in to comment.