Browse Source

增加训练任务未选代码分支时错误提示

tags/v1.22.1.1^2
liuzx 3 years ago
parent
commit
90648ac5e9
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      routers/repo/modelarts.go

+ 4
- 0
routers/repo/modelarts.go View File

@@ -1251,6 +1251,10 @@ func paramCheckCreateTrainJob(form auth.CreateModelArtsTrainJobForm) error {
log.Error("the WorkServerNumber(%d) must be in (1,25)", form.WorkServerNumber)
return errors.New("计算节点数必须在1-25之间")
}
if form.BranchName == nil || form.BranchName == "" {
log.Error("the branch must not be nil!", form.BranchName)
return errors.New("代码分支不能为空!")
}

return nil
}


Loading…
Cancel
Save