Commit 21d99a77 authored by an.nguyen's avatar an.nguyen
Browse files

Fix adv search bug with xvial plugin query

parent 9771d7b0
......@@ -299,8 +299,8 @@ module Chemotion
if search_method == 'advanced' && molecule_sort == false
arg_value_str = arg.first.value.gsub(/(\r)?\n/, ",")
return scope.order('position(\',\'||' + arg.first.field.column +
"::text||\',\' in ',#{arg_value_str},')")
return scope.order('position(\',\'||(' + arg.first.field.column +
"::text)||\',\' in ',#{arg_value_str},')")
elsif search_method == 'advanced' && molecule_sort == true
return scope.order('samples.updated_at DESC')
elsif search_method != 'advanced' && molecule_sort == true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment