Fix tests

This commit is contained in:
ErickSkrauch
2020-10-02 18:14:43 +03:00
parent 5fc97fdd7a
commit 7da6a952ee
4 changed files with 40 additions and 7 deletions

View File

@@ -189,7 +189,9 @@ class Account extends ActiveRecord {
public function afterDelete(): void {
parent::afterDelete();
Yii::$app->queue->push(new CreateWebHooksDeliveries(new AccountDeletedNotification($this)));
if ($this->status !== self::STATUS_REGISTERED) {
Yii::$app->queue->push(new CreateWebHooksDeliveries(new AccountDeletedNotification($this)));
}
}
}