diff options
author | yasuokav <yasuokav@gmail.com> | 2019-01-26 17:26:23 +0900 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-01-26 08:26:23 +0000 |
commit | 8510ac2687e77a31ebd436cf09d7875a0ed9a112 (patch) | |
tree | 25ee135898c634d6c8a672b51561834698d36cc8 | |
parent | ac766fe3de2ea2540921f1eba32b3e268efe3c01 (diff) | |
download | gitea-8510ac2687e77a31ebd436cf09d7875a0ed9a112.tar.gz gitea-8510ac2687e77a31ebd436cf09d7875a0ed9a112.zip |
Fix MinInterval (#5856)
Fixes #5847
-rw-r--r-- | routers/repo/setting.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index e74cfe2171..5e9e24f9f2 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -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 |