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