Ignore double base in group bys.

pull/6827/head
Konstantin Haase 14 years ago
parent 1ef60898b4
commit 844bce7601
  1. 2
      app/models/report/group_by/base.rb

@ -27,7 +27,7 @@ class Report::GroupBy
def all_group_fields(prefix = true) def all_group_fields(prefix = true)
@all_group_fields ||= [] @all_group_fields ||= []
@all_group_fields[prefix ? 0 : 1] ||= begin @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) (parent ? parent.all_group_fields(prefix) : []) + (prefix ? with_table(fields) : fields)
end.uniq end.uniq
end end

Loading…
Cancel
Save