fix: 修复普通用户无法校验cname配置的bug

This commit is contained in:
xiaojunnuo
2024-10-20 01:55:15 +08:00
parent 12116a89f4
commit 62854978bf
2 changed files with 11 additions and 8 deletions

View File

@@ -74,14 +74,17 @@ export class PipelineService extends BaseService<PipelineEntity> {
pipelineIds.push(record.id);
recordMap[record.id] = record;
}
const vars = await this.storageService.findPipelineVars(pipelineIds);
for (const varEntity of vars) {
const record = recordMap[varEntity.namespace];
if (record) {
const value = JSON.parse(varEntity.value);
record.lastVars = value.value;
if (pipelineIds?.length > 0) {
const vars = await this.storageService.findPipelineVars(pipelineIds);
for (const varEntity of vars) {
const record = recordMap[varEntity.namespace];
if (record) {
const value = JSON.parse(varEntity.value);
record.lastVars = value.value;
}
}
}
return result;
}