diff options
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 9d7e4074c3..690e7a4652 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -154,6 +154,11 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) { } } + if !repo.IsMirror { + ctx.Error(404) + return + } + repo.IsMirror = false if _, err := models.FinishMigrateRepository(repo, models.RepoPath(ctx.Repo.Owner.Name, repo.Name)); err != nil { |