diff --git a/apps/sim/lib/workflows/db-helpers.test.ts b/apps/sim/lib/workflows/db-helpers.test.ts index a092435c7..8f1668c5e 100644 --- a/apps/sim/lib/workflows/db-helpers.test.ts +++ b/apps/sim/lib/workflows/db-helpers.test.ts @@ -552,12 +552,12 @@ describe('Database Helpers', () => { workflowId: mockWorkflowId, type: 'starter', name: 'Start Block', - positionX: 100, - positionY: 100, + positionX: '100', + positionY: '100', enabled: true, horizontalHandles: true, isWide: false, - height: 150, + height: '150', parentId: null, extent: null, }) diff --git a/apps/sim/lib/workflows/db-helpers.ts b/apps/sim/lib/workflows/db-helpers.ts index 03f98bbc4..ccaea2264 100644 --- a/apps/sim/lib/workflows/db-helpers.ts +++ b/apps/sim/lib/workflows/db-helpers.ts @@ -43,13 +43,13 @@ export async function loadWorkflowFromNormalizedTables( type: block.type, name: block.name, position: { - x: block.positionX, - y: block.positionY, + x: Number(block.positionX), + y: Number(block.positionY), }, enabled: block.enabled, horizontalHandles: block.horizontalHandles, isWide: block.isWide, - height: block.height, + height: Number(block.height), subBlocks: block.subBlocks || {}, outputs: block.outputs || {}, data: block.data || {}, @@ -131,12 +131,12 @@ export async function saveWorkflowToNormalizedTables( workflowId: workflowId, type: block.type, name: block.name || '', - positionX: block.position?.x || 0, - positionY: block.position?.y || 0, + positionX: String(block.position?.x || 0), + positionY: String(block.position?.y || 0), enabled: block.enabled ?? true, horizontalHandles: block.horizontalHandles ?? true, isWide: block.isWide ?? false, - height: block.height || 0, + height: String(block.height || 0), subBlocks: block.subBlocks || {}, outputs: block.outputs || {}, data: block.data || {},