From bd2ad47d4c966544c403d1fc0e45346d8b95ac6c Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 22 Dec 2022 10:20:20 +0800 Subject: [PATCH] fix issue --- modules/templates/helper.go | 2 +- templates/custom/task_wait_count.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/templates/helper.go b/modules/templates/helper.go index b0e174214..115246eab 100755 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -471,7 +471,7 @@ func Str2html(raw string) template.HTML { func subOne(length int) int { return length - 1 } -func addOne(i) int64 { +func addOne(i interface{}) int64 { if i>=0 { return i + 1 } diff --git a/templates/custom/task_wait_count.tmpl b/templates/custom/task_wait_count.tmpl index 9dd95d2e5..73ecac3ac 100644 --- a/templates/custom/task_wait_count.tmpl +++ b/templates/custom/task_wait_count.tmpl @@ -1,7 +1,7 @@
- {{.i18n.Tr "repo.wait_count_start"}} {{.WaitCount}}{{if and (.WaitCount) (ne .WaitCount 0) }}{{addOne .WaitCount}}{{end}} {{.i18n.Tr "repo.wait_count_end"}} + {{.i18n.Tr "repo.wait_count_start"}} {{addOne .WaitCount}} {{.i18n.Tr "repo.wait_count_end"}}