From a837210029de028de6ae2b96ba0a3f8e087c477b Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 22 Dec 2022 23:27:46 -0800 Subject: [PATCH] Removed current job's subskills from search --- app/controllers/api/v1/search_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/v1/search_controller.rb b/app/controllers/api/v1/search_controller.rb index 13b6757..a383525 100644 --- a/app/controllers/api/v1/search_controller.rb +++ b/app/controllers/api/v1/search_controller.rb @@ -147,6 +147,7 @@ module Api JobSkill.method("#{locale}_search").call(search_params[:query]) .where(conditions) .where(sub: true) + .where.not(job: job.id) ) else JobSkill.all @@ -156,6 +157,7 @@ module Api JobSkill.all .where(conditions) .where(sub: true) + .where.not(job: job.id) ) .or( JobSkill.all