Browse Source

Add missing safety check

pull/2624/head
Martin Hartkorn 9 years ago
parent
commit
15394f613f
  1. 5
      routers/repo/setting.go

5
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 repo.IsMirror = false
if _, err := models.FinishMigrateRepository(repo, models.RepoPath(ctx.Repo.Owner.Name, repo.Name)); err != nil { if _, err := models.FinishMigrateRepository(repo, models.RepoPath(ctx.Repo.Owner.Name, repo.Name)); err != nil {

Loading…
Cancel
Save