From c2d97fb4aa11362782a747ed2b76bcf070ddb630 2016-10-20 16:48:22 From: Jean-Philippe Lang Date: 2016-10-20 16:48:22 Subject: [PATCH] Set @available_filters as an empty hash if nil. git-svn-id: http://svn.redmine.org/redmine/trunk@15911 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/query.rb b/app/models/query.rb index ef2efc7..b0b39da 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -456,6 +456,7 @@ class Query < ActiveRecord::Base def available_filters unless @available_filters initialize_available_filters + @available_filters ||= {} @available_filters.each do |field, options| options[:name] ||= l(options[:label] || "field_#{field}".gsub(/_id$/, '')) end