Skip to content

Commit c0d41c3

Browse files
committed
persist data changes to db
1 parent 4c8eeb6 commit c0d41c3

File tree

1 file changed

+6
-2
lines changed
  • apps/sim/lib/workflows/persistence

1 file changed

+6
-2
lines changed

apps/sim/lib/workflows/persistence/utils.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,14 @@ export async function loadWorkflowFromNormalizedTables(
418418
Promise.resolve().then(async () => {
419419
try {
420420
for (const [blockId, block] of Object.entries(finalBlocks)) {
421-
if (block.subBlocks !== blocksMap[blockId]?.subBlocks) {
421+
if (block !== blocksMap[blockId]) {
422422
await db
423423
.update(workflowBlocks)
424-
.set({ subBlocks: block.subBlocks, updatedAt: new Date() })
424+
.set({
425+
subBlocks: block.subBlocks,
426+
data: block.data,
427+
updatedAt: new Date(),
428+
})
425429
.where(
426430
and(eq(workflowBlocks.id, blockId), eq(workflowBlocks.workflowId, workflowId))
427431
)

0 commit comments

Comments
 (0)