From 8977d3d16191664bb1dc92c9a8ae362899cafffa Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Mon, 8 Nov 2021 16:41:37 +0100 Subject: [PATCH] fix for issue with search --- src/Api/Controllers/SearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Controllers/SearchController.php b/src/Api/Controllers/SearchController.php index 38d43e0..e5459f9 100644 --- a/src/Api/Controllers/SearchController.php +++ b/src/Api/Controllers/SearchController.php @@ -98,7 +98,7 @@ class SearchController extends ListDiscussionsController }); $discussions = Discussion::query() - ->whereIn('id', $results->pluck('discussion_id')) + ->whereIn('id', $results->pluck('discussion_id')->filter()) ->orWhereHas('posts', function ($query) use ($results) { $query->whereIn('id', $results->pluck('most_relevant_post_id')); })