Browse Source

Merge pull request '训练任务过滤数据集' (#1177) from fix-1146 into V20211228

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1177
Reviewed-by: lewis <747342561@qq.com>
pull/1181/head
lewis 3 years ago
parent
commit
22c066ba90
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/attachment.go

+ 1
- 1
models/attachment.go View File

@@ -429,7 +429,7 @@ func GetAllUserAttachments(userID int64) ([]*AttachmentUsername, error) {
func getModelArtsUserAttachments(e Engine, userID int64) ([]*AttachmentUsername, error) { func getModelArtsUserAttachments(e Engine, userID int64) ([]*AttachmentUsername, error) {
attachments := make([]*AttachmentUsername, 0, 10) attachments := make([]*AttachmentUsername, 0, 10)
if err := e.Table("attachment").Join("LEFT", "`user`", "attachment.uploader_id "+ 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 nil, err
} }
return attachments, nil return attachments, nil


Loading…
Cancel
Save