fix: do not delete primary schedule of script/flow on redeploy even if schedule wasn't loaded

This commit is contained in:
Ruben Fiszel
2024-10-17 15:25:19 +02:00
parent b237873a87
commit c3c2fe462c
2 changed files with 2 additions and 2 deletions
@@ -330,7 +330,7 @@
requestBody: { enabled }
})
}
} else if (scheduleExists) {
} else if (scheduleExists && !$triggersCount?.primary_schedule) {
await ScheduleService.deleteSchedule({
workspace: $workspaceStore ?? '',
path: $pathStore
@@ -331,7 +331,7 @@
} else if (enabled) {
await createSchedule(script.path)
}
} else if (scheduleExists) {
} else if (scheduleExists && !$triggersCount?.primary_schedule) {
await ScheduleService.deleteSchedule({
workspace: $workspaceStore ?? '',
path: script.path