Skip to content

Commit

Permalink
Favoring non-deprecated method
Browse files Browse the repository at this point in the history
Prior to this commit, with Bulkrax 5 there was a deprecation notice
regarding `xml_elements`.

With this commit, we're favoring
`field_mapping_from_values_for_xml_element_names`.

Related to:

samvera/bulkrax#705
  • Loading branch information
jeremyf committed Mar 14, 2023
1 parent a63ef3a commit 4ed97f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/bulkrax/xml_etd_dc_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def build_metadata
raise StandardError, "Missing source identifier (#{source_identifier})" if raw_metadata[source_identifier].blank?
self.parsed_metadata = {}
parsed_metadata[work_identifier] = [raw_metadata[source_identifier]]
xml_elements.each do |element_name|
field_mapping_from_values_for_xml_element_names.each do |element_name|
# TODO: Refactor this so we don't have duplicate loops and multiple places that repeat
# knowledge (e.g. what's the field name, or how we loop over elements)
next if complicated_elements.include?(element_name)
Expand Down

0 comments on commit 4ed97f0

Please sign in to comment.