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
pull/6827/head
p.tessenow 15 years ago
parent e3b1c1159d
commit c95123490d
  1. 4
      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<Array<Array<String,Symbol>, 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?

Loading…
Cancel
Save