Skip to content

Commit

Permalink
Avoid NoMethodError in Bulkrax::Importers::Controller#create. (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsitu authored Oct 10, 2023
1 parent 91c7663 commit 9968414
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/parsers/bulkrax/csv_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ 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?
model = r[model_mapping].nil? ? "" : r[model_mapping].strip
if model.casecmp('collection').zero?
@collections << r
elsif r[model_mapping].strip.casecmp('fileset').zero?
elsif model.casecmp('fileset').zero?
@file_sets << r
else
@works << r
Expand Down

0 comments on commit 9968414

Please sign in to comment.