diff --git a/Model.php b/Model.php index 6f09b85..a0d3750 100644 --- a/Model.php +++ b/Model.php @@ -209,7 +209,7 @@ class Model extends Base\Model if (empty($primary) || !$this->hasPrimaryValue()) { return $this->addError("Only primary key operations are supported.", 'mysql'); } - if (!$this->beforeDelete()) { + if ($this->beforeDelete()) { $result = static::deleteByCondition([$primary => $this->getPrimaryValue()]); Coroutine::create(function () use ($result) { $this->afterDelete($result);