fix: 修复模版id不正确导致修改到错误的模版流水线bug

This commit is contained in:
xiaojunnuo
2026-03-20 17:48:47 +08:00
parent 440d55ccb8
commit b1ff163a28
2 changed files with 6 additions and 3 deletions

View File

@@ -29,15 +29,15 @@ const pipelineOptions: PipelineOptions = {
onLoaded(detail);
return {
pipeline: {
id: detail.pipeline.id,
stages: [],
triggers: [],
...JSON.parse(detail.pipeline.content || "{}"),
type: detail.pipeline.type,
from: detail.pipeline.from,
id: detail.pipeline.id,
userId: detail.pipeline.userId,
projectId: detail.pipeline.projectId,
},
type: detail.pipeline.type,
from: detail.pipeline.from,
validTime: detail.pipeline.validTime,
webhookKey: detail.pipeline.webhookKey,
id: detail.pipeline.id,

View File

@@ -274,6 +274,9 @@ export class PipelineService extends BaseService<PipelineEntity> {
RunnableCollection.initPipelineRunnableType(pipeline);
pipeline.userId = bean.userId;
pipeline.projectId = bean.projectId;
if (bean.id) {
pipeline.id = bean.id;
}
let domains = [];
if (pipeline.stages) {
RunnableCollection.each(pipeline.stages, (runnable: any) => {