From bdd29295b49d596b09cd060702770ccf0cf72a6b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 24 Jul 2012 17:42:45 +0000 Subject: [PATCH] In case the column is not found. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10074 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 2d9ab303c..5df78929c 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -902,7 +902,7 @@ class Query < ActiveRecord::Base end order_options.scan(/cf_\d+/).uniq.each do |name| column = available_columns.detect {|c| c.name.to_s == name} - join = column.custom_field.join_for_order_statement + join = column && column.custom_field.join_for_order_statement if join joins << join end -- 2.39.5