mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 18:52:07 +08:00
Fix results search [SCI-9596]
This commit is contained in:
parent
67ec9b63f3
commit
cc5bbcde2f
1 changed files with 9 additions and 2 deletions
|
@ -43,9 +43,16 @@ class Result < ApplicationRecord
|
|||
new_query =
|
||||
Result
|
||||
.distinct
|
||||
.left_outer_joins(:result_texts)
|
||||
.left_outer_joins(:result_texts, result_tables: :table)
|
||||
.where(results: { my_module_id: module_ids })
|
||||
.where_attributes_like(['results.name', 'result_texts.text'], query, options)
|
||||
.where_attributes_like(
|
||||
[
|
||||
'results.name',
|
||||
'result_texts.name',
|
||||
'result_texts.text',
|
||||
'tables.name'
|
||||
], query, options
|
||||
)
|
||||
|
||||
new_query = new_query.active unless include_archived
|
||||
|
||||
|
|
Loading…
Reference in a new issue