mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Upgrade typeorm to 0.3.x (#5151)
This commit is contained in:
committed by
GitHub
parent
6608e69457
commit
0a5ab560b1
@@ -72,7 +72,7 @@ export class Execute extends Command {
|
||||
}
|
||||
|
||||
let workflowId: string | undefined;
|
||||
let workflowData: IWorkflowBase | undefined;
|
||||
let workflowData: IWorkflowBase | null = null;
|
||||
if (flags.file) {
|
||||
// Path to workflow is given
|
||||
try {
|
||||
@@ -91,7 +91,7 @@ export class Execute extends Command {
|
||||
// Do a basic check if the data in the file looks right
|
||||
// TODO: Later check with the help of TypeScript data if it is valid or not
|
||||
if (
|
||||
workflowData === undefined ||
|
||||
workflowData === null ||
|
||||
workflowData.nodes === undefined ||
|
||||
workflowData.connections === undefined
|
||||
) {
|
||||
@@ -108,8 +108,8 @@ export class Execute extends Command {
|
||||
if (flags.id) {
|
||||
// Id of workflow is given
|
||||
workflowId = flags.id;
|
||||
workflowData = await Db.collections.Workflow.findOne(workflowId);
|
||||
if (workflowData === undefined) {
|
||||
workflowData = await Db.collections.Workflow.findOneBy({ id: workflowId });
|
||||
if (workflowData === null) {
|
||||
console.info(`The workflow with the id "${workflowId}" does not exist.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user