Skip to content

Commit

Permalink
Merge pull request #93 from scientist-softserv/i91-fix-importer
Browse files Browse the repository at this point in the history
🐛 I91 fix importer issues
  • Loading branch information
Shana Moore authored Jun 20, 2024
2 parents 6fcb717 + 79a44cc commit 92e0667
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
3 changes: 2 additions & 1 deletion app/parsers/bulkrax/csv_parser_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module CsvParserDecorator

def valid_import?
missing_fields_by_model = records.each_with_object({}) do |record, hash|
record.compact!
record.transform_keys!(&:downcase).transform_keys!(&:to_sym)
missing_fields = missing_fields_for(record)
hash[record[:model]] = missing_fields if missing_fields.present?
Expand All @@ -16,7 +17,7 @@ def valid_import?

file_paths.is_a?(Array)
rescue StandardError => e
status_info(e)
set_status_info(e)
false
end

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/bulkrax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
'audience' => { from: ['audience'], split: '\|' },
'based_near' => { from: ['location'], split: '\|' },
'bibliographic_citation' => { from: ['bibliographic_citation'], split: '\|', generated: true },
'bulkrax_identifier' => { from: ['source_identifier'], source_identifier: true, generated: true },
'bulkrax_identifier' => { from: ['source_identifier'], source_identifier: true, generated: true, search_field: 'bulkrax_identifier_tesim' },
'children' => { from: ['children'], split: /\s*[;|]\s*/, related_children_field_mapping: true },
'chronology_note' => { from: ['chronology_note'], split: '\|' },
'committee_member' => { from: ['committee_member'], split: '\|' },
Expand Down
14 changes: 0 additions & 14 deletions config/metadata/bulkrax_metadata.yaml

This file was deleted.

0 comments on commit 92e0667

Please sign in to comment.