1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

Fix MinInterval (#5856)

Fixes #5847
This commit is contained in:
yasuokav 2019-01-26 17:26:23 +09:00 committed by zeripath
parent ac766fe3de
commit 8510ac2687

View File

@ -117,7 +117,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
}
interval, err := time.ParseDuration(form.Interval)
if err != nil && (interval != 0 || interval < setting.Mirror.MinInterval) {
if err != nil || (interval != 0 && interval < setting.Mirror.MinInterval) {
ctx.RenderWithErr(ctx.Tr("repo.mirror_interval_invalid"), tplSettingsOptions, &form)
} else {
ctx.Repo.Mirror.EnablePrune = form.EnablePrune