From e4836ea8f374f635e39de86165c0545129fbfce6 Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Fri, 19 May 2023 16:41:44 +0200 Subject: [PATCH] make sure to also trigger when cancelled is null (#8992) Co-authored-by: CarinaWolli --- packages/features/ee/workflows/api/scheduleEmailReminders.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/features/ee/workflows/api/scheduleEmailReminders.ts b/packages/features/ee/workflows/api/scheduleEmailReminders.ts index fb27e55bd5..919e98fd3f 100644 --- a/packages/features/ee/workflows/api/scheduleEmailReminders.ts +++ b/packages/features/ee/workflows/api/scheduleEmailReminders.ts @@ -102,10 +102,10 @@ async function handler(req: NextApiRequest, res: NextApiResponse) { where: { method: WorkflowMethods.EMAIL, scheduled: false, - cancelled: false, scheduledDate: { lte: dayjs().add(72, "hour").toISOString(), }, + OR: [{ cancelled: false }, { cancelled: null }], }, include: { workflowStep: true,