diff --git a/src/DataIndex/Grid/GridSearch.php b/src/DataIndex/Grid/GridSearch.php index 45ea97270..35f4015ec 100644 --- a/src/DataIndex/Grid/GridSearch.php +++ b/src/DataIndex/Grid/GridSearch.php @@ -112,6 +112,7 @@ public function searchElementsForUser( GridParameter $gridParameter, UserInterface $user ): AssetSearchResult|DataObjectSearchResult|DocumentSearchResult { + $type = $this->getStudioElementType($type); /** @var AssetQueryInterface|DataObjectQueryInterface|DocumentQueryInterface $query */ $query = $this->getSearchQuery($type, $gridParameter, $user); @@ -131,6 +132,7 @@ public function searchElementIdsForUser( GridParameter $gridParameter, UserInterface $user ): array { + $type = $this->getStudioElementType($type); /** @var AssetQueryInterface|DataObjectQueryInterface $query */ $query = $this->getSearchQuery($type, $gridParameter, $user); @@ -147,7 +149,6 @@ private function getSearchQuery( UserInterface $user ): QueryInterface { $filter = $gridParameter->getFilters(); - $type = $this->getStudioElementType($type); $filter = $this->setFilterPath($filter, $type, $gridParameter->getFolderId(), $user); $query = $this->queryFactory->create($type);