We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1116437 commit 0dfd146Copy full SHA for 0dfd146
app/code/Magento/Catalog/Model/ResourceModel/Category/AggregateCount.php
@@ -25,9 +25,7 @@ public function processDelete(Category $category)
25
*/
26
$parentIds = $category->getParentIds();
27
if ($parentIds) {
28
- $childDecrease = $category->getChildrenCount() + 1;
29
- // +1 is itself
30
- $data = ['children_count' => new \Zend_Db_Expr('children_count - ' . $childDecrease)];
+ $data = ['children_count' => new \Zend_Db_Expr('children_count - 1')];
31
$where = ['entity_id IN(?)' => $parentIds];
32
$resourceModel->getConnection()->update($resourceModel->getEntityTable(), $data, $where);
33
}
0 commit comments