🐛 修复 BUG
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user