Browse Source

fix-bug

tags/v1.22.3.2^2
liuzx 3 years ago
parent
commit
ce772f7c89
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