From 0604b7686386342a6613759748f96603cff2fa82 Mon Sep 17 00:00:00 2001 From: pgayvallet Date: Fri, 27 Jan 2023 09:08:41 +0100 Subject: [PATCH] use force option for clean --- src/plugins/ftr_apis/server/routes/kbn_client_so/clean.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/ftr_apis/server/routes/kbn_client_so/clean.ts b/src/plugins/ftr_apis/server/routes/kbn_client_so/clean.ts index 99850033735ad..e6b485526bad8 100644 --- a/src/plugins/ftr_apis/server/routes/kbn_client_so/clean.ts +++ b/src/plugins/ftr_apis/server/routes/kbn_client_so/clean.ts @@ -34,7 +34,7 @@ export const registerCleanRoute = (router: IRouter) => { for await (const response of finder.find()) { const objects = response.saved_objects.map(({ type, id }) => ({ type, id })); - const { statuses } = await soClient.bulkDelete(objects); + const { statuses } = await soClient.bulkDelete(objects, { force: true }); deleted += statuses.filter((status) => status.success).length; }