From 844bce76010f3450a654ecfe802264e0c24ece86 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Fri, 10 Dec 2010 14:19:34 +0100 Subject: [PATCH] Ignore double base in group bys. --- app/models/report/group_by/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/report/group_by/base.rb b/app/models/report/group_by/base.rb index 9833700178..6d974e8827 100644 --- a/app/models/report/group_by/base.rb +++ b/app/models/report/group_by/base.rb @@ -27,7 +27,7 @@ class Report::GroupBy def all_group_fields(prefix = true) @all_group_fields ||= [] @all_group_fields[prefix ? 0 : 1] ||= begin - fields = group_fields.reject { |c| c.blank? } + fields = group_fields.reject { |c| c.blank? or c == 'base' } (parent ? parent.all_group_fields(prefix) : []) + (prefix ? with_table(fields) : fields) end.uniq end