diff options
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index beda715c18..e4c4f897a0 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -109,9 +109,14 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) { ctx.Repo.Mirror.Interval = form.Interval ctx.Repo.Mirror.NextUpdate = time.Now().Add(time.Duration(form.Interval) * time.Hour) if err := models.UpdateMirror(ctx.Repo.Mirror); err != nil { - log.Error(4, "UpdateMirror: %v", err) + ctx.Handle(500, "UpdateMirror", err) + return } } + if err := ctx.Repo.Mirror.SaveAddress(form.MirrorAddress); err != nil { + ctx.Handle(500, "SaveAddress", err) + return + } } ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) |