Skip to content

Commit 43d7516

Browse files
committed
MC-15882: GraphQL getTree method does not work correctly
1 parent d1906d8 commit 43d7516

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function calculate(int $rootCategoryId) : int
4848
$connection = $this->resourceConnection->getConnection();
4949
$select = $connection->select()
5050
->from($this->resourceConnection->getTableName('catalog_category_entity'), 'level')
51-
->where($this->resourceCategory->getLinkField() . " = ?", $rootCategoryId);
51+
->where($this->resourceCategory->getEntityIdField() . " = ?", $rootCategoryId);
5252

5353
return (int) $connection->fetchOne($select);
5454
}

0 commit comments

Comments
 (0)