From 6217ba024d76f8595e35d5eacdd073e6876268e4 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Tue, 9 Jun 2020 19:19:19 +0200 Subject: [PATCH] use lowercase string for registration agency id --- app/models/doi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/doi.rb b/app/models/doi.rb index a2f84eeb3..7898ac351 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -793,7 +793,7 @@ def self.query(query, options={}) filter << { terms: { "types.resourceType": options[:resource_type].split(",") }} if options[:resource_type].present? filter << { terms: { provider_id: options[:provider_id].split(",") } } if options[:provider_id].present? filter << { terms: { client_id: options[:client_id].to_s.split(",") } } if options[:client_id].present? - filter << { terms: { agency: options[:registration_agency].split(",").map(&:humanize) } } if options[:registration_agency].present? + filter << { terms: { agency: options[:registration_agency].split(",").map(&:downcase) } } if options[:registration_agency].present? filter << { terms: { prefix: options[:prefix].to_s.split(",") } } if options[:prefix].present? filter << { term: { uid: options[:uid] }} if options[:uid].present? filter << { range: { created: { gte: "#{options[:created].split(",").min}||/y", lte: "#{options[:created].split(",").max}||/y", format: "yyyy" }}} if options[:created].present?