From 6bdbe1fe50008670f1be93be4ecb79806fcb8185 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 18 Oct 2022 12:46:20 +0200 Subject: [PATCH] (bug) cannot load statistic --- app/services/statistics/query_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/statistics/query_service.rb b/app/services/statistics/query_service.rb index 9c1580486..34b817f74 100644 --- a/app/services/statistics/query_service.rb +++ b/app/services/statistics/query_service.rb @@ -12,7 +12,7 @@ class Statistics::QueryService # run main query in elasticSearch query = MultiJson.load(request.body.read) - model = "Stats::#{statistic_index}".constantize + model = "Stats::#{statistic_index.capitalize}".constantize results = model.search(query, request.query_parameters.symbolize_keys).response # run additional custom aggregations, if any