mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-30 08:02:28 +00:00
Add missing safety check
This commit is contained in:
parent
3650bd8528
commit
15394f613f
|
@ -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…
Reference in a new issue