Skip to content

Commit

Permalink
Modify traject setting for component_identifier_format
Browse files Browse the repository at this point in the history
  • Loading branch information
marlo-longley committed Dec 12, 2023
1 parent 84bb48a commit cd3631f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/arclight/traject/ead2_component_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#
# NOTE: All fields should be stored in Solr
# ==================
to_field 'ref_ssi' do |record, accumulator, _context|
to_field 'ref_ssi' do |record, accumulator, context|
next if context.output_hash['ref_ssi']

accumulator << if record.attribute('id').blank?
Expand Down Expand Up @@ -96,8 +96,8 @@
next if context.output_hash['id']

data = {
ref_id: context.output_hash['ref_ssi']&.first,
root_id: settings[:root].output_hash['id']&.first,
ref_id: context.output_hash['ref_ssi']&.first
}

accumulator << (settings[:component_identifier_format] % data)
Expand Down Expand Up @@ -300,6 +300,7 @@
provide :counter, context.settings[:counter]
provide :depth, context.settings[:depth].to_i + 1
provide :component_traject_config, context.settings[:component_traject_config]
provide :component_identifier_format, context.settings[:component_identifier_format]
end

i.load_config_file(context.settings[:component_traject_config])
Expand Down
1 change: 0 additions & 1 deletion lib/arclight/traject/ead2_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ def increment
provide :depth, 1
provide :logger, context.settings[:logger]
provide :component_traject_config, context.settings[:component_traject_config]
provide :component_identifier_format, context.settings[:component_identifier_format] if context.settings[:component_identifier_format]
end

i.load_config_file(context.settings[:component_traject_config])
Expand Down

0 comments on commit cd3631f

Please sign in to comment.