From ecb63ff136fe18689f7730f612f522bb2fb7f4ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 23 Feb 2022 11:01:19 +0800 Subject: [PATCH] modify plugin name --- Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);