diff options
Diffstat (limited to 'modules/middleware/repo.go')
-rw-r--r-- | modules/middleware/repo.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index bc90c05cc7..cb4a8632a2 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -56,7 +56,9 @@ func RepoAssignment(redirect bool) martini.Handler { // get repository repo, err := models.GetRepositoryByName(user.Id, params["reponame"]) if err != nil { - if redirect { + if err == models.ErrRepoNotExist { + ctx.Handle(404, "RepoAssignment", err) + } else if redirect { ctx.Redirect("/") return } |