Parcourir la source

test: fix failing postgres test

Should use case insensitive matching when searching for users
Marcus Efraimsson il y a 8 ans
Parent
commit
1e10fcad83
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      pkg/services/sqlstore/user.go

+ 1 - 1
pkg/services/sqlstore/user.go

@@ -400,7 +400,7 @@ func SearchUsers(query *m.SearchUsersQuery) error {
 	}
 
 	if query.Query != "" {
-		whereConditions = append(whereConditions, "(email LIKE ? OR name LIKE ? OR login like ?)")
+		whereConditions = append(whereConditions, "(email "+dialect.LikeStr()+" ? OR name "+dialect.LikeStr()+" ? OR login "+dialect.LikeStr()+" ?)")
 		whereParams = append(whereParams, queryWithWildcards, queryWithWildcards, queryWithWildcards)
 	}