From 719a9821ee5517cb7e8ce23ca41b92805ad1c4dd Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Fri, 8 Mar 2024 10:26:11 -0800 Subject: [PATCH] :bug: Fix for configurable model registration Because the model registry for Collection and Administrative Sets weren't using the Hyrax configuration, incorrect mappings were observed which prevented the collection edit page from loading. In this commit we resolve this issue by using the Hyrax configuration in the model registry. --- lib/wings/setup.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wings/setup.rb b/lib/wings/setup.rb index e6b8bc697c..cebed2a6cb 100644 --- a/lib/wings/setup.rb +++ b/lib/wings/setup.rb @@ -128,8 +128,8 @@ def build_or_set(attributes, &block) end Wings::ModelRegistry.register(Hyrax::AccessControl, Hydra::AccessControl) -Wings::ModelRegistry.register(Hyrax::AdministrativeSet, AdminSet) -Wings::ModelRegistry.register(Hyrax::PcdmCollection, ::Collection) +Wings::ModelRegistry.register(Hyrax.config.admin_set_class, AdminSet) +Wings::ModelRegistry.register(Hyrax.config.collection_class, ::Collection) Wings::ModelRegistry.register(Hyrax::FileSet, FileSet) Wings::ModelRegistry.register(Hyrax::Embargo, Hydra::AccessControls::Embargo) Wings::ModelRegistry.register(Hyrax::Lease, Hydra::AccessControls::Lease)