In case the column is not found.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10074 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-07-24 17:42:45 +00:00
parent faab8678d4
commit bdd29295b4
1 changed files with 1 additions and 1 deletions

View File

@ -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