mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix: Sync partial execution version of FE and BE, also allow enforcing a specific version (#12840)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ImportWorkflowFromUrlDto } from '@n8n/api-types';
|
||||
import { ImportWorkflowFromUrlDto, ManualRunQueryDto } from '@n8n/api-types';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
// eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import
|
||||
import { In, type FindOptionsRelations } from '@n8n/typeorm';
|
||||
@@ -9,7 +9,6 @@ import { ApplicationError } from 'n8n-workflow';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { z } from 'zod';
|
||||
|
||||
import config from '@/config';
|
||||
import type { Project } from '@/databases/entities/project';
|
||||
import { SharedWorkflow } from '@/databases/entities/shared-workflow';
|
||||
import { WorkflowEntity } from '@/databases/entities/workflow-entity';
|
||||
@@ -367,7 +366,11 @@ export class WorkflowsController {
|
||||
|
||||
@Post('/:workflowId/run')
|
||||
@ProjectScope('workflow:execute')
|
||||
async runManually(req: WorkflowRequest.ManualRun) {
|
||||
async runManually(
|
||||
req: WorkflowRequest.ManualRun,
|
||||
_res: unknown,
|
||||
@Query query: ManualRunQueryDto,
|
||||
) {
|
||||
if (!req.body.workflowData.id) {
|
||||
throw new ApplicationError('You cannot execute a workflow without an ID', {
|
||||
level: 'warning',
|
||||
@@ -395,9 +398,7 @@ export class WorkflowsController {
|
||||
req.body,
|
||||
req.user,
|
||||
req.headers['push-ref'],
|
||||
req.query.partialExecutionVersion === '-1'
|
||||
? config.getEnv('featureFlags.partialExecutionVersionDefault')
|
||||
: req.query.partialExecutionVersion,
|
||||
query.partialExecutionVersion,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user