Skip to content

Commit

Permalink
check to rules ids
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Feb 1, 2024
1 parent 48dd666 commit b3d61c1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions x-pack/plugins/ml/server/models/job_service/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ export function jobsProvider(
})
.map((rule) => rule.id);

await rulesClient.bulkDeleteRules({
ids: ruleIds,
});
if (ruleIds.length > 0) {
await rulesClient.bulkDeleteRules({
ids: ruleIds,
});
}
}

for (const jobId of jobIds) {
Expand Down

0 comments on commit b3d61c1

Please sign in to comment.