samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
182 stars 122 forks source link

Based Near Prepopulation Creates Errors #6775

Open jeremyf opened 2 months ago

jeremyf commented 2 months ago

Descriptive summary

The following spec for ./spec/forms/hyrax/forms/resource_form_spec.rb fails:

  describe '#based_near' do
    it 'has a default of an empty based near' do
      expect(work.based_near).to be_empty
      form.prepopulate!
      expect(form.based_near).to be_empty
    end
  end

This is a bit surprising. The issue with this failing is that later on we have problems with the based_near lookup service.

Namely we have the following issue:

ArgumentError:
  g637840 (Valkyrie::ID) is not a valid type

# app/services/hyrax/location_service.rb:28:in `extract_id`

Which is happening in the following location: ./app/indexers/concerns/hyrax/location_indexer.rb.

Note this is showing up as a Hyku error.