Skip to content

Commit 9035b0b

Browse files
committed
Promo save observer throw Exception then getting error resolve
update condition
1 parent 0714971 commit 9035b0b

File tree

1 file changed

+2
-2
lines changed
  • app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote

1 file changed

+2
-2
lines changed

app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ public function __construct(
6161
*/
6262
public function execute()
6363
{
64-
if ($this->getRequest()->getPostValue()) {
64+
$data = $this->getRequest()->getPostValue();
65+
if ($data) {
6566
try {
6667
/** @var $model \Magento\SalesRule\Model\Rule */
6768
$model = $this->_objectManager->create(\Magento\SalesRule\Model\Rule::class);
6869
$this->_eventManager->dispatch(
6970
'adminhtml_controller_salesrule_prepare_save',
7071
['request' => $this->getRequest()]
7172
);
72-
$data = $this->getRequest()->getPostValue();
7373
if (empty($data['from_date'])) {
7474
$data['from_date'] = $this->timezone->formatDate();
7575
}

0 commit comments

Comments
 (0)