Skip to content

Commit

Permalink
Merge pull request #6937 from samvera/collection-type-fix
Browse files Browse the repository at this point in the history
call to_rdf_representation in #collections?
  • Loading branch information
Shana Moore authored Oct 30, 2024
2 parents d16baff + 4e6035a commit a8ae953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/hyrax/collection_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def collections(use_valkyrie: Hyrax.config.use_valkyrie?, model: Hyrax.config.co
# @return [Boolean] True if there are any collections of this collection type in the repository
def collections?
return false unless id
Hyrax::SolrQueryService.new.with_field_pairs(field_pairs: { Hyrax.config.collection_type_index_field.to_sym => to_global_id.to_s }).with_model(model: Hyrax.config.collection_class).count > 0
Hyrax::SolrQueryService.new.with_field_pairs(field_pairs: { Hyrax.config.collection_type_index_field.to_sym => to_global_id.to_s }).with_model(model: Hyrax.config.collection_class.to_rdf_representation).count > 0
end

# @return [Boolean] True if this is the Admin Set type
Expand Down

0 comments on commit a8ae953

Please sign in to comment.