From 09ba634556866e7600cb19415b06579483085f7c Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 10 Oct 2023 18:03:05 -0700 Subject: [PATCH] Bugfix on user search page --- pkg/models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/models/user.go b/pkg/models/user.go index c1853c1..b6c52ee 100644 --- a/pkg/models/user.go +++ b/pkg/models/user.go @@ -269,7 +269,7 @@ func SearchUsers(user *User, search *UserSearch, pager *Pagination) ([]*User, er if search.Username != "" { ilike := "%" + strings.TrimSpace(strings.ToLower(search.Username)) + "%" - wheres = append(wheres, "username LIKE ? OR name ILIKE ?") + wheres = append(wheres, "(username LIKE ? OR name ILIKE ?)") placeholders = append(placeholders, ilike, ilike) }