]> source.dussan.org Git - redmine.git/commitdiff
Set @available_filters as an empty hash if nil.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 20 Oct 2016 16:48:22 +0000 (16:48 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 20 Oct 2016 16:48:22 +0000 (16:48 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15911 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/query.rb

index ef2efc735f0cc829a8b90439323f7adef32c925b..b0b39da737c6231207b153b2bfaa9f65c6ceb95c 100644 (file)
@@ -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