From 7b6845ec3ef343d7c6da02f22681c95dcaab5d46 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Thu, 29 Aug 2024 16:22:28 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E4=B8=AA=E4=BA=BA=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9D=A1=E4=BB=B6=E5=A2=9E=E5=8A=A0=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=90=8D=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/queries/projects/list_query.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/queries/projects/list_query.rb b/app/queries/projects/list_query.rb index 931f26145..737cd7c2d 100644 --- a/app/queries/projects/list_query.rb +++ b/app/queries/projects/list_query.rb @@ -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])