Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update schedule-workflow.ts

Kiran Kf39c2ca3ee05
diff --git a/apps/web/lib/api/workflows/schedule-workflow.ts b/apps/web/lib/api/workflows/schedule-workflow.ts
index 2679c661ed..dae058b3ef 100644
--- a/apps/web/lib/api/workflows/schedule-workflow.ts
+++ b/apps/web/lib/api/workflows/schedule-workflow.ts
@@ -8,14 +8,12 @@ export async function scheduleWorkflow(workflow: Workflow | null) {
return;
}
- const workflowConfig = parseWorkflowConfig(workflow);
+ const condition = parseWorkflowConfig(workflow)?.condition;
- if (!workflowConfig) {
+ if (!condition) {
return;
}
- const { condition } = workflowConfig;
-
// Skip scheduling if the condition is not based on partnerEnrolledDays,
// or if the required enrolled days is 0 (immediate execution case)
if (condition.attribute !== "partnerEnrolledDays" || condition.value === 0) {