Commit abaeab71 authored by pierre.tremouilhac's avatar pierre.tremouilhac
Browse files

Merge branch 'xvial-adv-search' into 'development'

Xvial adv search

See merge request ComPlat/chemotion_ELN!464
parents 9771d7b0 21d99a77
......@@ -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