Browse Source

Fix MinInterval (#5856)

Fixes #5847
tags/v1.21.12.1
yasuokav zeripath 7 years ago
parent
commit
8510ac2687
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      routers/repo/setting.go

+ 1
- 1
routers/repo/setting.go 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


Loading…
Cancel
Save