diff --git a/Model/Validate.php b/Model/Validate.php index fd25010..2931c50 100644 --- a/Model/Validate.php +++ b/Model/Validate.php @@ -101,6 +101,10 @@ public function __construct( */ public function beforeSave() { + if($this->isCommandLine()) { + return parent::beforeSave(); + } + $postData = $this->request->getPostValue(); $postValues = $postData['groups']['general']['fields']; $storeId = $this->request->getParam('store', 0); @@ -133,6 +137,14 @@ public function beforeSave() } } + /** + * Detect command line call. + * @return void + */ + public function isCommandLine() { + return 'bin/magento' === $this->request->getServerValue('_'); + } + /** * Validates eKomi account credentials *