fix: ignore case while sorting usernames (#7870)

This commit is contained in:
Marcin Tojek
2023-06-06 12:37:41 +02:00
committed by GitHub
parent 660bbb8d38
commit ee45b3df77
4 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -933,7 +933,7 @@ func (q *fakeQuerier) GetUsers(_ context.Context, params database.GetUsersParams
// Database orders by username
slices.SortFunc(users, func(a, b database.User) bool {
return a.Username < b.Username
return strings.ToLower(a.Username) < strings.ToLower(b.Username)
})
// Filter out deleted since they should never be returned..