소스 검색

test: fix failing postgres test

Should use case insensitive matching when searching for users
Marcus Efraimsson 8 년 전
부모
커밋
1e10fcad83
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 != "" {
 	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)
 		whereParams = append(whereParams, queryWithWildcards, queryWithWildcards, queryWithWildcards)
 	}
 	}