aboutsummaryrefslogtreecommitdiff
path: root/modules/context/org.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context/org.go')
-rw-r--r--modules/context/org.go7
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