diff --git a/app/parsers/bulkrax/csv_parser_decorator.rb b/app/parsers/bulkrax/csv_parser_decorator.rb index 415b4c588..a75378fb3 100644 --- a/app/parsers/bulkrax/csv_parser_decorator.rb +++ b/app/parsers/bulkrax/csv_parser_decorator.rb @@ -23,7 +23,8 @@ def valid_import? private def missing_fields_for(record) - required_fields = determine_required_fields_for(record[:model]) + model = record[:model] || Bulkrax.default_work_type + required_fields = determine_required_fields_for(model) required_fields.select do |field| # checks the field itself # any parser_mappings fields terms from `config/initializers/bulkrax.rb`