mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-25 13:37:12 +08:00
Merge pull request #8960 from okriuchykhin/ok_SCI_12477
Fix duplicated records appearance in global search [SCI-12477]
This commit is contained in:
commit
2b47b02698
1 changed files with 2 additions and 5 deletions
|
|
@ -139,11 +139,8 @@ class SearchController < ApplicationController
|
|||
protected
|
||||
|
||||
def search_by_name(options = {})
|
||||
@records = @model.search(current_user,
|
||||
@include_archived,
|
||||
@search_query,
|
||||
@teams,
|
||||
options)
|
||||
@records = @model.search(current_user, @include_archived, @search_query, @teams, options)
|
||||
@records = @model.from(@records, @model.table_name)
|
||||
.select("COUNT(\"#{@model.table_name}\".\"id\") OVER() AS filtered_count")
|
||||
.select("\"#{@model.table_name}\".*")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue