From c95123490dda43ed1aeed440f0dfb388bc0df1fc Mon Sep 17 00:00:00 2001 From: "p.tessenow" Date: Thu, 8 Jul 2010 11:52:19 +0000 Subject: [PATCH] fixed transformer-bug, there was an error when no group was set git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1347 7926756e-e54e-46e6-9721-ed318f58905e --- app/models/cost_query/transformer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/cost_query/transformer.rb b/app/models/cost_query/transformer.rb index a6ed5ba6c5..31e0e78fd6 100644 --- a/app/models/cost_query/transformer.rb +++ b/app/models/cost_query/transformer.rb @@ -24,7 +24,7 @@ class CostQuery::Transformer fields, all_fields = all_fields, all_fields - current_fields aggregate.grouped_by fields, type, current_fields end - result or current.result + result or query.result end end @@ -32,7 +32,7 @@ class CostQuery::Transformer # Important side effect: it sets @ungrouped, @all_fields. # @return [Array, Symbol>>] Group by fields + types (:row or :column) def restructured - rows, columns, current = [], [], @query.chain + rows, columns, current = [], [], query.chain @all_fields = [] until current.filter? @ungrouped = current.result if current.responsible_for_sql?