Merge branch 'standalone_develop' into pre_trustie_server

This commit is contained in:
“xxq250” 2022-11-01 17:53:40 +08:00
commit ccaae183b1
1 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ class Projects::ListQuery < ApplicationQuery
end
def call
collection = Project.all
collection = Project.visible
collection = filter_projects(collection)
sort = params[:sort_by] || "updated_on"
@ -35,9 +35,9 @@ class Projects::ListQuery < ApplicationQuery
def by_search(items)
ids = Projects::ElasticsearchService.call(params[:search])
if ids.present?
items.visible.where(id: ids).by_name_or_identifier(params[:search])
items.where(id: ids).by_name_or_identifier(params[:search])
else
items.visible.by_name_or_identifier(params[:search])
items.by_name_or_identifier(params[:search])
end
end