Skip to content

Commit 7f380b6

Browse files
committed
#29174 Category save: transport all existing data to the save function
1 parent 0f983b2 commit 7f380b6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/code/Magento/Catalog/Model/CategoryRepository.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ public function save(\Magento\Catalog\Api\Data\CategoryInterface $category)
8282
$existingData = array_diff_key($existingData, array_flip(['path', 'level', 'parent_id']));
8383
$existingData['store_id'] = $storeId;
8484

85-
if ($category->getData('save_rewrites_history', null) !== null) {
86-
$existingData['save_rewrites_history'] = $category->getData('save_rewrites_history');
87-
}
85+
$existingData = array_replace($existingData, $category->getData());
8886

8987
if ($category->getId()) {
9088
$metadata = $this->getMetadataPool()->getMetadata(

0 commit comments

Comments
 (0)