diff options
author | Unknwon <u@gogs.io> | 2017-03-16 17:18:43 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-16 17:18:43 -0400 |
commit | 0ccd7c97abcb1ae314c9c17b0c08863cb13115fa (patch) | |
tree | d5314ef88257d64b3749194c024ca853486f799e /modules/context/org.go | |
parent | 4e64e71e28dcfb9ef41d7cbc63ff1474ad8e5126 (diff) |
models: rename ErrUserNotExist -> errors.UserNotExist
Diffstat (limited to 'modules/context/org.go')
-rw-r--r-- | modules/context/org.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/context/org.go b/modules/context/org.go index 24ef5ef6..3cde8d63 100644 --- a/modules/context/org.go +++ b/modules/context/org.go @@ -10,6 +10,7 @@ import ( "gopkg.in/macaron.v1" "github.com/gogits/gogs/models" + "github.com/gogits/gogs/models/errors" "github.com/gogits/gogs/modules/setting" ) @@ -49,11 +50,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { var err error ctx.Org.Organization, err = models.GetUserByName(orgName) if err != nil { - if models.IsErrUserNotExist(err) { - ctx.Handle(404, "GetUserByName", err) - } else { - ctx.Handle(500, "GetUserByName", err) - } + ctx.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err) return } org := ctx.Org.Organization |