Skip to content

Commit 7ff8e86

Browse files
Fix error message if user not exist (#16343)
Co-authored-by: Sergey Dryabzhinsky <[email protected]>
1 parent c65e49d commit 7ff8e86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/user/helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func GetUserByParamsName(ctx *context.APIContext, name string) *models.User {
1717
user, err := models.GetUserByName(username)
1818
if err != nil {
1919
if models.IsErrUserNotExist(err) {
20-
if redirectUserID, err := models.LookupUserRedirect(username); err == nil {
20+
if redirectUserID, err2 := models.LookupUserRedirect(username); err2 == nil {
2121
context.RedirectToUser(ctx.Context, username, redirectUserID)
2222
} else {
2323
ctx.NotFound("GetUserByName", err)

0 commit comments

Comments
 (0)