Importing a CSV without a model column leads to the importer failing to run and logging this error: NameError - uninitialized constant Hyrax::Form Did you mean? Hyrax::Forms.
CSVs imported without a model column should fallback on Bulkrax.default_work_type.
SoftServ QA:
I tried running 2 importers, listed below. The Bulkrax::ImporterJob is stuck in the sidekiq's retries and is preventing me from being able to check this
Story
Importing a CSV without a model column leads to the importer failing to run and logging this error:
NameError - uninitialized constant Hyrax::Form Did you mean? Hyrax::Forms
.CSVs imported without a model column should fallback on
Bulkrax.default_work_type
.Slack thread
Acceptance Criteria
GenericWorks
instead of throwing an errorTesting Instructions and Sample Files
Notes
Stack trace
``` /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/inflector/methods.rb:285:in `const_get' /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/inflector/methods.rb:285:in `block in constantize' /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/inflector/methods.rb:281:in `each' /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/inflector/methods.rb:281:in `inject' /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/inflector/methods.rb:281:in `constantize' /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/core_ext/string/inflections.rb:68:in `constantize' /app/samvera/hyrax-webapp/app/parsers/bulkrax/csv_parser_decorator.rb:42:in `determine_required_fields_for' /app/samvera/hyrax-webapp/app/parsers/bulkrax/csv_parser_decorator.rb:26:in `missing_fields_for' /app/samvera/hyrax-webapp/app/parsers/bulkrax/csv_parser_decorator.rb:11:in `block in valid_import?' /app/samvera/hyrax-webapp/app/parsers/bulkrax/csv_parser_decorator.rb:9:in `each' /app/samvera/hyrax-webapp/app/parsers/bulkrax/csv_parser_decorator.rb:9:in `each_with_object' /app/samvera/hyrax-webapp/app/parsers/bulkrax/csv_parser_decorator.rb:9:in `valid_import?' /usr/local/bundle/bundler/gems/bulkrax-f2439755f501/app/models/bulkrax/importer.rb:21:in `valid_import?' /app/samvera/hyrax-webapp/app/jobs/bulkrax/importer_job_decorator.rb:9:in `import' /usr/local/bundle/bundler/gems/bulkrax-f2439755f501/app/jobs/bulkrax/importer_job.rb:12:in `perform' /usr/local/bundle/gems/activejob-5.2.8.1/lib/active_job/execution.rb:39:in `block in perform_now' /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:109:in `block in run_callbacks' /usr/local/bundle/gems/sentry-raven-2.13.0/lib/raven/integrations/rails/active_job.rb:13:in `block (2 levels) in included' /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:118:in `instance_exec' /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks' /usr/local/bundle/gems/i18n-1.14.1/lib/i18n.rb:322:in `with_locale' /usr/local/bundle/gems/activejob-5.2.8.1/lib/active_job/translation.rb:9:in `block (2 levels) inExample failed importer in prod