summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryasuokav <yasuokav@gmail.com>2019-01-26 17:26:23 +0900
committerzeripath <art27@cantab.net>2019-01-26 08:26:23 +0000
commit8510ac2687e77a31ebd436cf09d7875a0ed9a112 (patch)
tree25ee135898c634d6c8a672b51561834698d36cc8
parentac766fe3de2ea2540921f1eba32b3e268efe3c01 (diff)
downloadgitea-8510ac2687e77a31ebd436cf09d7875a0ed9a112.tar.gz
gitea-8510ac2687e77a31ebd436cf09d7875a0ed9a112.zip
Fix MinInterval (#5856)
Fixes #5847
-rw-r--r--routers/repo/setting.go2
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