summaryrefslogtreecommitdiffstats
path: root/modules/middleware/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/middleware/repo.go')
-rw-r--r--modules/middleware/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index 0aaecec84b..c14df2750e 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -41,7 +41,7 @@ func ApiRepoAssignment() macaron.Handler {
} else {
u, err = models.GetUserByName(userName)
if err != nil {
- if err == models.ErrUserNotExist {
+ if models.IsErrUserNotExist(err) {
ctx.Error(404)
} else {
ctx.JSON(500, &base.ApiJsonErr{"GetUserByName: " + err.Error(), base.DOC_URL})
@@ -217,7 +217,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
} else {
u, err = models.GetUserByName(userName)
if err != nil {
- if err == models.ErrUserNotExist {
+ if models.IsErrUserNotExist(err) {
ctx.Handle(404, "GetUserByName", err)
} else {
ctx.Handle(500, "GetUserByName", err)