Skip to content

Commit c6d1b0f

Browse files
authored
[Bug]: Use Studio Type. (#1798)
* Use Studio Type. * Fix
1 parent 985dd6e commit c6d1b0f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/DataIndex/Grid/GridSearch.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public function searchElementsForUser(
112112
GridParameter $gridParameter,
113113
UserInterface $user
114114
): AssetSearchResult|DataObjectSearchResult|DocumentSearchResult {
115+
$type = $this->getStudioElementType($type);
115116
/** @var AssetQueryInterface|DataObjectQueryInterface|DocumentQueryInterface $query */
116117
$query = $this->getSearchQuery($type, $gridParameter, $user);
117118

@@ -131,6 +132,7 @@ public function searchElementIdsForUser(
131132
GridParameter $gridParameter,
132133
UserInterface $user
133134
): array {
135+
$type = $this->getStudioElementType($type);
134136
/** @var AssetQueryInterface|DataObjectQueryInterface $query */
135137
$query = $this->getSearchQuery($type, $gridParameter, $user);
136138

@@ -147,7 +149,6 @@ private function getSearchQuery(
147149
UserInterface $user
148150
): QueryInterface {
149151
$filter = $gridParameter->getFilters();
150-
$type = $this->getStudioElementType($type);
151152
$filter = $this->setFilterPath($filter, $type, $gridParameter->getFolderId(), $user);
152153

153154
$query = $this->queryFactory->create($type);

0 commit comments

Comments
 (0)