Browse Source

fixed 个人项目列表条件增加标签名查询

pull/346/head
xxq250 1 year ago
parent
commit
7b6845ec3e
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      app/queries/projects/list_query.rb

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

@@ -77,10 +77,7 @@ class Projects::ListQuery < ApplicationQuery
end

def by_project_topic(items)
if params[:topic_name].present? && @current_user_id.present?
Project.visible.where(status: 1).with_project_topic_name(params[:topic_name].to_s.split(","))
.or(Project.is_private.with_project_topic_name(params[:topic_name].to_s.split(",")).where(user_id: @current_user_id))
elsif params[:topic_name].present?
if params[:topic_name].present?
items.with_project_topic_name(params[:topic_name].to_s.split(","))
else
items.with_project_topic(params[:topic_id])


Loading…
Cancel
Save