From 08c8ce757edfff4e1e214dc470d3167ecc302c3a Mon Sep 17 00:00:00 2001 From: Wisp X Date: Fri, 14 Jan 2022 16:41:03 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Image.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Image.php b/app/Models/Image.php index e660f695..dd42124f 100644 --- a/app/Models/Image.php +++ b/app/Models/Image.php @@ -79,8 +79,9 @@ class Image extends Model { static::deleting(function (self $image) { // TODO 检测是否启用了队列,放置队列中异步删除 - // 是否存在其他相同 md5 和 sha1 的记录,没有则可以删除物理文件 + // 在当前图片所属的策略中是否存在其他相同 md5 和 sha1 的记录,没有则可以删除物理文件 if (! static::query() + ->where('strategy_id', $image->strategy) ->where('id', '<>', $image->id) ->where('md5', $image->md5) ->where('sha1', $image->sha1)