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

🐛 Odds and Ends #6708

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/indexers/concerns/hyrax/permission_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module PermissionIndexer
def to_solr
super.tap do |index_document|
config = Hydra.config.permissions
permissions = resource.permission_manager
permissions = resource.permission_manager || Hyrax::PermissionManager.new(resource: resource)

index_document[config.edit.group] = permissions.edit_groups.to_a
index_document[config.edit.individual] = permissions.edit_users.to_a
Expand Down
2 changes: 1 addition & 1 deletion lib/hyrax/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ def translate_uri_to_id
attr_writer :translate_id_to_uri
def translate_id_to_uri
@translate_id_to_uri ||= lambda do |id|
"#{ActiveFedora.fedora.host}#{ActiveFedora.fedora.base_path}/#{::Noid::Rails.treeify(id)}"
"#{ActiveFedora.fedora.host}#{ActiveFedora.fedora.base_path}/#{::Noid::Rails.treeify(id.to_s)}"
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/wings/valkyrie/query_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def find_references_by(resource:, property:, model: nil)
return find_many_by_ids(ids: Array(resource.send(property))) unless model

results = resource.public_send(property).map do |reference|
resource_factory.to_resource(object: ::ActiveFedora::Base.find(reference))
resource_factory.to_resource(object: ::ActiveFedora::Base.find(reference.to_s))
end

results.select { |r| r.class.name == model.name }
Expand Down