summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/queries_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb
index d6c6b59f4..20dae6fd4 100644
--- a/app/helpers/queries_helper.rb
+++ b/app/helpers/queries_helper.rb
@@ -52,6 +52,8 @@ module QueriesHelper
ungrouped << [field_options[:name], field]
end
end
+ # Remove empty groups
+ grouped.delete_if {|k, v| v.empty?}
# Don't group dates if there's only one (eg. time entries filters)
if grouped[:label_date].try(:size) == 1
ungrouped << grouped.delete(:label_date).first