Browse Source

Merge branch 'fix-1591' of https://git.openi.org.cn/OpenI/aiforge into fix-1591

pull/1693/head
Gitea 3 years ago
parent
commit
ec310bfe02
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/attachment.go

+ 1
- 1
models/attachment.go View File

@@ -585,7 +585,7 @@ func Attachments(opts *AttachmentsOptions) ([]*AttachmentInfo, int64, error) {
} else {
lowerKeyWord := strings.ToLower(opts.Keyword)

cond = cond.And(builder.Or(builder.Like{"LOWER(attachment.name)", lowerKeyWord}))
cond = cond.And(builder.Or(builder.Like{"LOWER(attachment.name)", lowerKeyWord}, builder.Like{"LOWER(attachment.description)", lowerKeyWord}))
count, err = sess.Table(&Attachment{}).Where(cond).Count(new(AttachmentInfo))

}


Loading…
Cancel
Save