From 552e49cf4df88e6fecaac0dfc3f2a64b07734d9f Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 19 Jan 2020 13:28:00 +0100 Subject: [PATCH] use correct key to look up region name --- app/controllers/concerns/facetable.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/concerns/facetable.rb b/app/controllers/concerns/facetable.rb index b3caa04ed..2190d0d2f 100644 --- a/app/controllers/concerns/facetable.rb +++ b/app/controllers/concerns/facetable.rb @@ -85,9 +85,7 @@ def facet_by_schema(arr) def facet_by_region(arr) arr.map do |hsh| - hsh["key"] = hsh["key"].downcase - - { "id" => hsh["key"], + { "id" => hsh["key"].downcase, "title" => REGIONS[hsh["key"]] || hsh["key"], "count" => hsh["doc_count"] } end