From 5f7a980c5fc0ad421e596ece24fe257380ff2000 Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Wed, 18 Mar 2026 21:39:13 -0700 Subject: [PATCH] fix(schedules): deployment bug (#3666) * fix(schedules): deployment bug * fix --- apps/sim/lib/workflows/schedules/deploy.test.ts | 1 + apps/sim/lib/workflows/schedules/deploy.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/sim/lib/workflows/schedules/deploy.test.ts b/apps/sim/lib/workflows/schedules/deploy.test.ts index 0f48c1ef2a..f58755a307 100644 --- a/apps/sim/lib/workflows/schedules/deploy.test.ts +++ b/apps/sim/lib/workflows/schedules/deploy.test.ts @@ -796,6 +796,7 @@ describe('Schedule Deploy Utilities', () => { expect(mockOnConflictDoUpdate).toHaveBeenCalledWith({ target: expect.any(Array), + targetWhere: expect.objectContaining({ type: 'isNull' }), set: expect.objectContaining({ blockId: 'block-1', cronExpression: '0 9 * * *', diff --git a/apps/sim/lib/workflows/schedules/deploy.ts b/apps/sim/lib/workflows/schedules/deploy.ts index 7046e6ae58..b6546293a8 100644 --- a/apps/sim/lib/workflows/schedules/deploy.ts +++ b/apps/sim/lib/workflows/schedules/deploy.ts @@ -138,6 +138,7 @@ export async function createSchedulesForDeploy( workflowSchedule.blockId, workflowSchedule.deploymentVersionId, ], + targetWhere: isNull(workflowSchedule.archivedAt), set: setValues, })