mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
Fix bug with globally disabling mirror (#11760)
Ensure we return after `ctx.Error(...)`
This commit is contained in:
parent
0cb22121f4
commit
2c5b3c72e8
2 changed files with 4 additions and 1 deletions
|
@ -115,6 +115,7 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) {
|
|||
|
||||
if form.Mirror && setting.Repository.DisableMirrors {
|
||||
ctx.Error(http.StatusForbidden, "MirrorsGlobalDisabled", fmt.Errorf("the site administrator has disabled mirrors"))
|
||||
return
|
||||
}
|
||||
|
||||
var opts = migrations.MigrateOptions{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue