From f310eb45d011412fef7421839317054898fa8e48 Mon Sep 17 00:00:00 2001 From: Mh-Asmi Date: Wed, 15 Jan 2025 15:33:59 +0400 Subject: [PATCH] fix add post to collection --- .../Modules/V5/Http/Controllers/CollectionPostController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ushahidi/Modules/V5/Http/Controllers/CollectionPostController.php b/src/Ushahidi/Modules/V5/Http/Controllers/CollectionPostController.php index 7c166d29c4..beac50dc3c 100644 --- a/src/Ushahidi/Modules/V5/Http/Controllers/CollectionPostController.php +++ b/src/Ushahidi/Modules/V5/Http/Controllers/CollectionPostController.php @@ -26,7 +26,9 @@ class CollectionPostController extends V5Controller */ private function checkCollectionIsFound(int $collection_id) { - return $this->queryBus->handle(new FetchCollectionByIdQuery($collection_id)); + $find_collection_query = new FetchCollectionByIdQuery($collection_id); + $find_collection_query->addOnlyValues(['id'], [], [], []); + return $this->queryBus->handle($find_collection_query); } /**