feat: add no data alert in test substep and execution

This commit is contained in:
Ali BARIN
2022-09-01 22:22:18 +02:00
parent 91f5f1d628
commit dc79d623be
6 changed files with 47 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ class Execution extends Base {
id!: string;
flowId!: string;
testRun = false;
internalId!: string;
internalId: string;
executionSteps: ExecutionStep[] = [];
static tableName = 'executions';

View File

@@ -38,11 +38,16 @@ class Processor {
if (initialTriggerData.length === 0) {
const lastInternalId = await this.flow.lastInternalId();
await Execution.query().insert({
const executionData: Partial<Execution> = {
flowId: this.flow.id,
testRun: this.testRun,
internalId: lastInternalId,
});
};
if (lastInternalId) {
executionData.internalId = lastInternalId;
}
await Execution.query().insert(executionData);
return;
}