From 2b124f1e61da30a103f78a645e0237cb8c14d577 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 8 Feb 2015 16:24:19 +0000 Subject: [PATCH] Don't call #upcase on nil. git-svn-id: http://svn.redmine.org/redmine/trunk@13994 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/query.rb b/app/models/query.rb index 281346ece..0e6064fc6 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -509,7 +509,7 @@ class Query < ActiveRecord::Base # Returns the SQL sort order that should be prepended for grouping def group_by_sort_order if grouped? && (column = group_by_column) - order = (sort_criteria_order_for(column.name) || column.default_order).upcase + order = (sort_criteria_order_for(column.name) || column.default_order).try(:upcase) column.sortable.is_a?(Array) ? column.sortable.collect {|s| "#{s} #{order}"}.join(',') : "#{column.sortable} #{order}" -- 2.39.5