Skip to content

Commit 16506fe

Browse files
committed
MAGETWO-83706: Scheduled Update to existing Group Price / Special Price removes the previously configured price, or results in changes not being saved
1 parent ddf58d1 commit 16506fe

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/Backend/TierPrice/SaveHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function execute($entity, $arguments = [])
8080
$priceRows = $entity->getData($attribute->getName());
8181
if (null !== $priceRows) {
8282
if (!is_array($priceRows)) {
83-
throw new \Magento\Framework\Exception\RuntimeException(
83+
throw new \Magento\Framework\Exception\InputException(
8484
__('Tier prices data should be array, but actually other type is received')
8585
);
8686
}

app/code/Magento/Catalog/Model/Product/Attribute/Backend/TierPrice/UpdateHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function execute($entity, $arguments = [])
7777
$priceRows = $entity->getData($attribute->getName());
7878
if (null !== $priceRows) {
7979
if (!is_array($priceRows)) {
80-
throw new \Magento\Framework\Exception\RuntimeException(
80+
throw new \Magento\Framework\Exception\InputException(
8181
__('Tier prices data should be array, but actually other type is received')
8282
);
8383
}

app/code/Magento/Catalog/Test/Unit/Model/Attribute/Backend/TierPrice/SaveHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function testExecute()
151151
}
152152

153153
/**
154-
* @expectedException \Magento\Framework\Exception\RuntimeException
154+
* @expectedException \Magento\Framework\Exception\InputException
155155
* @expectedExceptionMessage Tier prices data should be array, but actually other type is received
156156
*/
157157
public function testExecuteWithException()

app/code/Magento/Catalog/Test/Unit/Model/Attribute/Backend/TierPrice/UpdateHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function testExecute()
160160
}
161161

162162
/**
163-
* @expectedException \Magento\Framework\Exception\RuntimeException
163+
* @expectedException \Magento\Framework\Exception\InputException
164164
* @expectedExceptionMessage Tier prices data should be array, but actually other type is received
165165
*/
166166
public function testExecuteWithException()

0 commit comments

Comments
 (0)