Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 I91 fix importer issues #93

Merged
merged 5 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method was deprecated in Bulkrax v6.0.0. Because of this, the imports would fail silently if there's an issue.

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.

Loading