From 3407f0b2bc74abbcfce7939a1b89e2c51fc5dc4f Mon Sep 17 00:00:00 2001 From: liuzx Date: Thu, 23 Dec 2021 15:24:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=AD=E7=BB=83=E4=BB=BB=E5=8A=A1=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=95=B0=E6=8D=AE=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/attachment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/attachment.go b/models/attachment.go index d217a61a4..2b3c1fd65 100755 --- a/models/attachment.go +++ b/models/attachment.go @@ -429,7 +429,7 @@ func GetAllUserAttachments(userID int64) ([]*AttachmentUsername, error) { func getModelArtsUserAttachments(e Engine, userID int64) ([]*AttachmentUsername, error) { attachments := make([]*AttachmentUsername, 0, 10) if err := e.Table("attachment").Join("LEFT", "`user`", "attachment.uploader_id "+ - "= `user`.id").Where("attachment.type = ? and (uploader_id= ? or is_private = ?)", TypeCloudBrainTwo, userID, false).Find(&attachments); err != nil { + "= `user`.id").Where("attachment.type = ? and (uploader_id= ? or is_private = ?) and attachment.decompress_state = ?", TypeCloudBrainTwo, userID, false, DecompressStateDone).Find(&attachments); err != nil { return nil, err } return attachments, nil