mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 03:59:51 +08:00
Fix for numeric item in SQL array
This commit is contained in:
parent
54c78cf4d1
commit
39593b6342
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ module SearchableModel
|
|||
a_query = query.split.map { |a| "%#{sanitize_sql_like(a)}%" }
|
||||
where_str =
|
||||
(attrs.map.with_index do |a, i|
|
||||
if a == 'repository_rows.id'
|
||||
if %w(repository_rows.id repository_number_values.data).include?(a)
|
||||
"CAST(#{a} AS TEXT) #{like} ANY (array[:t#{i}]) OR "
|
||||
else
|
||||
"(trim_html_tags(#{a})) #{like} ANY (array[:t#{i}]) OR "
|
||||
|
|
Loading…
Reference in a new issue