mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Fix sorting of executions not working on postgres and mysql (#15423)
This commit is contained in:
@@ -32,13 +32,23 @@ export async function createExecution(
|
||||
>,
|
||||
workflow: IWorkflowBase,
|
||||
) {
|
||||
const { data, finished, mode, startedAt, stoppedAt, waitTill, status, deletedAt, metadata } =
|
||||
attributes;
|
||||
const {
|
||||
data,
|
||||
finished,
|
||||
mode,
|
||||
startedAt,
|
||||
stoppedAt,
|
||||
waitTill,
|
||||
status,
|
||||
deletedAt,
|
||||
metadata,
|
||||
createdAt,
|
||||
} = attributes;
|
||||
|
||||
const execution = await Container.get(ExecutionRepository).save({
|
||||
finished: finished ?? true,
|
||||
mode: mode ?? 'manual',
|
||||
createdAt: new Date(),
|
||||
createdAt: createdAt ?? new Date(),
|
||||
startedAt: startedAt === undefined ? new Date() : startedAt,
|
||||
...(workflow !== undefined && { workflowId: workflow.id }),
|
||||
stoppedAt: stoppedAt ?? new Date(),
|
||||
|
||||
Reference in New Issue
Block a user