Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
gy4443
chemotion_eln_server
Commits
21d99a77
Commit
21d99a77
authored
Oct 04, 2017
by
an.nguyen
Browse files
Fix adv search bug with xvial plugin query
parent
9771d7b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/api/chemotion/search_api.rb
View file @
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment