Skip to content

Commit

Permalink
Avoid NoMethodError in Bulkrax::Importers::Controller#create.
Browse files Browse the repository at this point in the history
  • Loading branch information
lsitu committed Oct 9, 2023
1 parent 91c7663 commit c052738
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/parsers/bulkrax/csv_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def build_records
model_field_mappings.map(&:to_sym).each do |model_mapping|
next unless r.key?(model_mapping)

if r[model_mapping].strip.casecmp('collection').zero?
if r[model_mapping]&.strip&.casecmp('collection')&.zero?
@collections << r
elsif r[model_mapping].strip.casecmp('fileset').zero?
elsif r[model_mapping]&.strip&.casecmp('fileset')&.zero?
@file_sets << r
else
@works << r
Expand Down

0 comments on commit c052738

Please sign in to comment.