Skip to content

Commit 66bf74d

Browse files
authored
Escape reference to user table in models.SearchEmails (#16313)
Fix #16312 Signed-off-by: Adyanth H <[email protected]>
1 parent 0966349 commit 66bf74d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/user_mail.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ type SearchEmailResult struct {
316316
// SearchEmails takes options i.e. keyword and part of email name to search,
317317
// it returns results in given range and number of total results.
318318
func SearchEmails(opts *SearchEmailOptions) ([]*SearchEmailResult, int64, error) {
319-
var cond builder.Cond = builder.Eq{"user.`type`": UserTypeIndividual}
319+
var cond builder.Cond = builder.Eq{"`user`.`type`": UserTypeIndividual}
320320
if len(opts.Keyword) > 0 {
321321
likeStr := "%" + strings.ToLower(opts.Keyword) + "%"
322322
cond = cond.And(builder.Or(

0 commit comments

Comments
 (0)