diff options
author | 6543 | 2021-07-05 22:58:47 +0200 |
---|---|---|
committer | GitHub | 2021-07-05 23:58:47 +0300 |
commit | 7ff8e863a5a0a794444792e990a6a37886dbd2bb (patch) | |
tree | 438c44c376af2eb96b6952bc0a8a0658ff8fa08c | |
parent | c65e49d72f823d10d045dc7a50fee96953527b76 (diff) |
Fix error message if user not exist (#16343)
Co-authored-by: Sergey Dryabzhinsky <sergey@rusoft.ru>
-rw-r--r-- | routers/api/v1/user/helper.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/user/helper.go b/routers/api/v1/user/helper.go index fcdac257e..a3500e0ee 100644 --- a/routers/api/v1/user/helper.go +++ b/routers/api/v1/user/helper.go @@ -17,7 +17,7 @@ func GetUserByParamsName(ctx *context.APIContext, name string) *models.User { user, err := models.GetUserByName(username) if err != nil { if models.IsErrUserNotExist(err) { - if redirectUserID, err := models.LookupUserRedirect(username); err == nil { + if redirectUserID, err2 := models.LookupUserRedirect(username); err2 == nil { context.RedirectToUser(ctx.Context, username, redirectUserID) } else { ctx.NotFound("GetUserByName", err) |