Skip to content

Commit 8510ac2

Browse files
yasuokavzeripath
authored andcommitted
Fix MinInterval (#5856)
Fixes #5847
1 parent ac766fe commit 8510ac2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/repo/setting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
117117
}
118118

119119
interval, err := time.ParseDuration(form.Interval)
120-
if err != nil && (interval != 0 || interval < setting.Mirror.MinInterval) {
120+
if err != nil || (interval != 0 && interval < setting.Mirror.MinInterval) {
121121
ctx.RenderWithErr(ctx.Tr("repo.mirror_interval_invalid"), tplSettingsOptions, &form)
122122
} else {
123123
ctx.Repo.Mirror.EnablePrune = form.EnablePrune

0 commit comments

Comments
 (0)