Skip to content

Commit

Permalink
Bugfix: Check that the api key is available #752
Browse files Browse the repository at this point in the history
  • Loading branch information
michielgerritsen committed Feb 26, 2024
1 parent fa60d53 commit 4b42ae3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Model/Adminhtml/Backend/ChangeApiMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public function beforeSave(): self
public function afterSave()
{
$apiKey = $this->getApiKey($this->getValue());
$this->updateProfileId->execute($apiKey, $this->getScope(), $this->getScopeId());
if ($apiKey) {
$this->updateProfileId->execute($apiKey, $this->getScope(), $this->getScopeId());
}

return parent::afterSave();
}
Expand Down

0 comments on commit 4b42ae3

Please sign in to comment.