fix(queries/get-executions): recover flow and steps relations
This commit is contained in:
@@ -45,16 +45,18 @@ const getExecutions = async (
|
|||||||
.clone()
|
.clone()
|
||||||
.joinRelated('executionSteps as execution_steps')
|
.joinRelated('executionSteps as execution_steps')
|
||||||
.select('executions.*', raw(selectStatusStatement))
|
.select('executions.*', raw(selectStatusStatement))
|
||||||
|
.groupBy('executions.id')
|
||||||
|
.orderBy('updated_at', 'desc');
|
||||||
|
|
||||||
|
const computedExecutions = Execution
|
||||||
|
.query()
|
||||||
|
.with('executions', executions)
|
||||||
.withSoftDeleted()
|
.withSoftDeleted()
|
||||||
.withGraphFetched({
|
.withGraphFetched({
|
||||||
flow: {
|
flow: {
|
||||||
steps: true,
|
steps: true,
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
.groupBy('executions.id')
|
|
||||||
.orderBy('updated_at', 'desc');
|
|
||||||
|
|
||||||
const computedExecutions = Execution.query().with('executions', executions);
|
|
||||||
|
|
||||||
if (filters?.flowId) {
|
if (filters?.flowId) {
|
||||||
computedExecutions.where('executions.flow_id', filters.flowId);
|
computedExecutions.where('executions.flow_id', filters.flowId);
|
||||||
|
Reference in New Issue
Block a user