Skip to content

Commit

Permalink
Merge pull request #1043 from scientist-softserv/i1042-bulkrax-empty-…
Browse files Browse the repository at this point in the history
…model-falls-back-on-default-work-type-as-intended

i1042 Fall back on default work type when model is empty
  • Loading branch information
bkiahstroud authored Jun 29, 2024
2 parents 0d02824 + e1361be commit c8e5438
Showing 1 changed file with 2 additions and 1 deletion.
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 @@ -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`
Expand Down

0 comments on commit c8e5438

Please sign in to comment.