added default value for group by in init of new query

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@226 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
hjust 15 years ago
parent a92918415f
commit ff8b503f8f
  1. 2
      app/controllers/cost_reports_controller.rb
  2. 2
      app/models/cost_query.rb

@ -84,8 +84,6 @@ private
@query.display_time_entries = params[:cost_query][:display_time_entries]
end
@query.group_by = params[:group_by]
session[:cost_query] = {:project_id => @query.project_id,
:filters => @query.filters,
:group_by => @query.group_by,

@ -87,7 +87,7 @@ class CostQuery < ActiveRecord::Base
self.display_time_entries = true if display_time_entries.nil?
self.display_cost_entries = true if display_cost_entries.nil?
self.group_by = {} if group_by.blank?
self.group_by ||= {}
end
def self.operators

Loading…
Cancel
Save