From 648fe80d128002d2d98805cf745aa268feee471a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 20 Feb 2020 20:21:28 +0800 Subject: [PATCH] 1 --- app/services/search_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/search_service.rb b/app/services/search_service.rb index 98501abdf..8914bde88 100644 --- a/app/services/search_service.rb +++ b/app/services/search_service.rb @@ -42,7 +42,7 @@ class SearchService < ApplicationService { where: { id: Laboratory.current.shixuns.where(public: 2, status: 2, fork_from: nil).or(Laboratory.current.shixuns.where(status: 2, id: User.current.shixuns)).pluck(:id) } } when 'subject' then { where: { id: Laboratory.current.subjects.where(public: 2, status: 2) - .or( Laboratory.current.subjects.where(status: 2, id: User.current.subjects.pluck(:id))) } } + .or( Laboratory.current.subjects.where(status: 2, id: User.current.subjects)).pluck(:id) } } when 'course' then { where: { id: Laboratory.current.all_courses.pluck(:id) } } else