fix: 修复流水线复制出错的bug

This commit is contained in:
xiaojunnuo
2026-01-20 16:56:36 +08:00
parent 61192b998a
commit 418bcddc95
2 changed files with 6 additions and 3 deletions
@@ -51,7 +51,10 @@ export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCru
delete form.lastVars;
delete form.createTime;
delete form.id;
let pipeline = JSON.parse(form.content);
let pipeline = form.content;
if (typeof pipeline === "string" && pipeline.startsWith("{")) {
pipeline = JSON.parse(form.content);
}
pipeline.title = form.title;
pipeline = setRunnableIds(pipeline);
form.content = JSON.stringify(pipeline);
@@ -130,7 +130,7 @@ export class AliyunDeployCertToESA extends AbstractTaskPlugin {
try{
await this.clearSiteCert(client,siteId);
}catch (e) {
this.logger.error("清理站点[${siteId}]证书失败",e)
this.logger.error(`清理站点[${siteId}]证书失败`,e)
}
try {
@@ -160,7 +160,7 @@ export class AliyunDeployCertToESA extends AbstractTaskPlugin {
try{
await this.clearSiteCert(client,siteId);
}catch (e) {
this.logger.error("清理站点[${siteId}]证书失败",e)
this.logger.error(`清理站点[${siteId}]证书失败`,e)
}
}
}