diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 0d62b751c..5581f1ff2 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -397,7 +397,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)