Browse Source

fix-1363

tags/v1.22.1.2
liuzx 3 years ago
parent
commit
f27b797d08
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      routers/repo/modelarts.go

+ 2
- 1
routers/repo/modelarts.go View File

@@ -12,6 +12,7 @@ import (
"strconv"
"strings"
"time"
"unicode/utf8"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth"
@@ -1291,7 +1292,7 @@ func paramCheckCreateInferenceJob(form auth.CreateModelArtsInferenceJobForm) err
return errors.New("分支名不能为空")
}

if len(form.Description) > 255 {
if utf8.RuneCountInString(form.Description) > 255 {
log.Error("the Description length(%d) must not more than 255", form.Description)
return errors.New("描述字符不能超过255个字符")
}


Loading…
Cancel
Save