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:
parent
faab8678d4
commit
bdd29295b4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue