Browse Source

项目搜索增加用户信息搜索

pull/313/head
“xxq250” 3 years ago
parent
commit
005687442e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/queries/projects/list_query.rb

+ 1
- 1
app/queries/projects/list_query.rb View File

@@ -37,7 +37,7 @@ class Projects::ListQuery < ApplicationQuery
ids = Projects::ElasticsearchService.call(params[:search])
items = items.where(platform: 'forge')
if ids.present?
items.where(id: ids).by_name_or_identifier(params[:search]).or.where(user_id: User.like(params[:search]).pluck(:id))
items.where(id: ids).by_name_or_identifier(params[:search]).or(Project.visible.where(user_id: User.like(params[:search]).pluck(:id)))
else
items.by_name_or_identifier(params[:search])
end


Loading…
Cancel
Save