未验证 提交 077a8913 编写于 作者: Z zhatiai 提交者: GitHub

fix the bug that get the workflow scheduleID by fake clusterID in template build module (#2984)

Signed-off-by: Nzhatiai <zhatiai@koderover.com>
Co-authored-by: Nzhatiai <zhatiai@koderover.com>
上级 2b92da10
......@@ -70,7 +70,7 @@ func FindBuild(name, productName string, log *zap.SugaredLogger) (*commonmodels.
return nil, e.ErrGetBuildModule.AddErr(err)
}
if resp.PreBuild != nil && resp.PreBuild.StrategyID == "" {
if resp.TemplateID == "" && resp.PreBuild != nil && resp.PreBuild.StrategyID == "" {
cluster, err := commonrepo.NewK8SClusterColl().FindByID(resp.PreBuild.ClusterID)
if err != nil {
if err != mongo.ErrNoDocuments {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册