mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Merge pull request #3832 from n8n-io/n8n-4289-nodeids
add check for node ids migration
This commit is contained in:
commit
1e076d7690
|
@ -19,7 +19,11 @@ export class AddNodeIds1658932910559 implements MigrationInterface {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
await runChunked(queryRunner, workflowsQuery, (workflows) => {
|
await runChunked(queryRunner, workflowsQuery, (workflows) => {
|
||||||
workflows.forEach(async (workflow) => {
|
workflows.forEach(async (workflow) => {
|
||||||
const nodes = workflow.nodes;
|
let nodes = workflow.nodes;
|
||||||
|
if (typeof nodes === 'string') {
|
||||||
|
nodes = JSON.parse(nodes);
|
||||||
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
nodes.forEach((node) => {
|
nodes.forEach((node) => {
|
||||||
if (!node.id) {
|
if (!node.id) {
|
||||||
|
|
Loading…
Reference in a new issue