diff options
author | Unknwon <u@gogs.io> | 2015-03-16 04:04:27 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-03-16 04:04:27 -0400 |
commit | 588f3215c6c4a82c7ad9cbd2cc6a5683d0ca3cc2 (patch) | |
tree | 3c62e7d0e50bf3d4046ecf07fd33063a3d8958ac /routers/repo/repo.go | |
parent | 471b8a18ab73b181b0d6769e2bd95111afd0e9d3 (diff) | |
download | gitea-588f3215c6c4a82c7ad9cbd2cc6a5683d0ca3cc2.tar.gz gitea-588f3215c6c4a82c7ad9cbd2cc6a5683d0ca3cc2.zip |
#1040: dashboard no longer accessible when repo is missing
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 37d07c563f..a70f31e614 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -251,7 +251,7 @@ func Fork(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("new_fork") if _, err := getForkRepository(ctx); err != nil { - if err == models.ErrRepoNotExist { + if models.IsErrRepoNotExist(err) { ctx.Redirect(setting.AppSubUrl + "/") } else { ctx.Handle(500, "getForkRepository", err) @@ -275,7 +275,7 @@ func ForkPost(ctx *middleware.Context, form auth.CreateRepoForm) { forkRepo, err := getForkRepository(ctx) if err != nil { - if err == models.ErrRepoNotExist { + if models.IsErrRepoNotExist(err) { ctx.Redirect(setting.AppSubUrl + "/") } else { ctx.Handle(500, "getForkRepository", err) |