From 0e2e3a74afdc025de84243d9c5d033289f76a86c Mon Sep 17 00:00:00 2001 From: Corey Gillen Date: Thu, 14 May 2026 10:08:10 -0700 Subject: [PATCH 1/2] Load collection data from Solr for OAISets --- app/models/oai_set.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/oai_set.rb b/app/models/oai_set.rb index 0aeda3f99..0383e4c59 100644 --- a/app/models/oai_set.rb +++ b/app/models/oai_set.rb @@ -57,8 +57,8 @@ def initialize(spec, opts = {}) private def name_from_spec - collection = Collection.find @spec - return nil if collection.collection_type.to_global_id.to_s != Hyrax::CollectionType.find_by(machine_id: :oai_set).to_global_id.to_s + collection = SolrDocument.find @spec + return nil if collection.collection_type_gid != Hyrax::CollectionType.find_by(machine_id: :oai_set).to_global_id Hyrax::SolrService.query("id:#{@value}", rows: 1).first['title_tesim'].first end From 2dc8e5fa10087de5b5c3e1f38b01a22224294ecf Mon Sep 17 00:00:00 2001 From: Corey Gillen Date: Fri, 15 May 2026 13:08:22 -0700 Subject: [PATCH 2/2] Update spec for new Solr search --- spec/models/oai_set_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/oai_set_spec.rb b/spec/models/oai_set_spec.rb index 870fa1ee3..20f0490fc 100644 --- a/spec/models/oai_set_spec.rb +++ b/spec/models/oai_set_spec.rb @@ -10,7 +10,7 @@ described_class.controller = controller described_class.fields = fields allow(controller).to receive(:params).and_return({}) - allow(ActiveFedora::Base).to receive(:find).and_return(coll) + allow(SolrDocument).to receive(:find).and_return(coll) end describe 'from_spec' do