Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use configured admin_set_class to test admin_set? in solr doc #5425

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

elrayle
Copy link
Contributor

@elrayle elrayle commented Feb 2, 2022

refs #5408

PR #5421, PR #5422, PR #5423, PR #5424 were all related to producing and querying a solr doc so that admin sets appeared in the list of collections on Dashboard -> Collections.

Once they were in the list, their links were not correct. The links were created using the collection routes instead of admin set routes. This was happening because the SolrDocument for admin sets was always return false for #admin_set?. And this was happening because the method #admin_set? was checking for class ::AdminSet. This PR updates the method to check for class Hyrax.config.admin_set_class. This config defaults to AdminSet allowing for backward compatibility. And allows for valkyrie apps (e.g. nurax-pg) which are configured to Hyrax::AdministrativeSets to correctly identify admin sets.

@samvera/hyrax-code-reviewers

@no-reply no-reply merged commit 3626f6d into main Feb 3, 2022
@no-reply
Copy link
Member

no-reply commented Feb 3, 2022

thank you!

@no-reply no-reply deleted the as_solr_doc_admin_set branch February 3, 2022 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants