Skip to content

Commit 166c0d4

Browse files
committed
MC-13613: Product mass update
1 parent 2a6cddd commit 166c0d4

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

app/code/Magento/CatalogInventory/Plugin/MassUpdateProductAttribute.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ class MassUpdateProductAttribute
4444
*/
4545
private $attributeHelper;
4646

47-
/**
48-
* @var \Magento\Backend\Model\View\Result\Redirect
49-
*/
50-
private $redirectFactory;
5147
/**
5248
* @var \Magento\Framework\Message\ManagerInterface
5349
*/
@@ -60,7 +56,6 @@ class MassUpdateProductAttribute
6056
* @param \Magento\CatalogInventory\Api\StockItemRepositoryInterface $stockItemRepository
6157
* @param \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration
6258
* @param \Magento\Catalog\Helper\Product\Edit\Action\Attribute $attributeHelper
63-
* @param \Magento\Backend\Model\View\Result\RedirectFactory $redirectFactory
6459
* @param \Magento\Framework\Message\ManagerInterface $messageManager
6560
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
6661
*/
@@ -71,7 +66,6 @@ public function __construct(
7166
\Magento\CatalogInventory\Api\StockItemRepositoryInterface $stockItemRepository,
7267
\Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration,
7368
\Magento\Catalog\Helper\Product\Edit\Action\Attribute $attributeHelper,
74-
\Magento\Backend\Model\View\Result\RedirectFactory $redirectFactory,
7569
\Magento\Framework\Message\ManagerInterface $messageManager
7670
) {
7771
$this->stockIndexerProcessor = $stockIndexerProcessor;
@@ -80,7 +74,6 @@ public function __construct(
8074
$this->stockItemRepository = $stockItemRepository;
8175
$this->stockConfiguration = $stockConfiguration;
8276
$this->attributeHelper = $attributeHelper;
83-
$this->redirectFactory = $redirectFactory;
8477
$this->messageManager = $messageManager;
8578
}
8679

@@ -111,14 +104,14 @@ public function aroundExecute(Save $subject, callable $proceed)
111104
return $proceed();
112105
} catch (\Magento\Framework\Exception\LocalizedException $e) {
113106
$this->messageManager->addErrorMessage($e->getMessage());
107+
return $proceed();
114108
} catch (\Exception $e) {
115109
$this->messageManager->addExceptionMessage(
116110
$e,
117111
__('Something went wrong while updating the product(s) attributes.')
118112
);
113+
return $proceed();
119114
}
120-
121-
return $this->redirectFactory->create()->setPath('catalog/product/', ['_current' => true]);
122115
}
123116

124117
/**

0 commit comments

Comments
 (0)