Skip to content

Commit

Permalink
Requested code format change
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldogsbody committed Jul 26, 2024
1 parent 37d64f2 commit 06baf81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,12 @@ def self.query(query, options = {})
minimum_should_match = 0

filter << { terms: { doi: options[:ids].map(&:upcase) } } if options[:ids].present?
filter << { terms: { resource_type_id: options[:resource_type_id].split(",").map(&:underscore).map(&:dasherize) } } if options[:resource_type_id].present?
if options[:resource_type_id].present?
resource_type_ids = options[:resource_type_id]
.split(",")
.map { |id| id.strip.underscore.dasherize }
filter << { terms: { resource_type_id: resource_type_ids } }
end
filter << { terms: { "types.resourceType": options[:resource_type].split(",") } } if options[:resource_type].present?
if options[:provider_id].present?
options[:provider_id].split(",").each { |id|
Expand Down

0 comments on commit 06baf81

Please sign in to comment.