FIX: Checking if old pipelines exists

This commit is contained in:
Gabriel Rosa
2022-09-09 11:56:39 -03:00
parent 35172681ce
commit 319fc80bfe
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -46,10 +46,11 @@ export class PipelinesService {
const { pipelines } = await this.pipelineClient.findAll({
info: data,
});
pipelines.forEach((pipeline) => {
this.adjustPayload(pipeline);
});
return { pipelines };
if (pipelines)
pipelines.forEach((pipeline) => {
this.adjustPayload(pipeline);
});
return { pipelines: pipelines || [] };
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
+1 -1
View File
File diff suppressed because one or more lines are too long