diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 7b2d567e3a1..acd97648bf9 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -404,7 +404,7 @@ func orgAssignment(args ...bool) macaron.Handler { if assignTeam { ctx.Org.Team, err = models.GetTeamByID(ctx.ParamsInt64(":teamid")) if err != nil { - if models.IsErrUserNotExist(err) { + if models.IsErrTeamNotExist(err) { ctx.NotFound() } else { ctx.Error(http.StatusInternalServerError, "GetTeamById", err)