From 1690013e59c88ab1e2d2ed56c8e7db57e1bb1d71 Mon Sep 17 00:00:00 2001 From: SuZhou-Joe Date: Mon, 1 Apr 2024 17:13:00 +0800 Subject: [PATCH] feat: remove null Signed-off-by: SuZhou-Joe --- .../create_or_upgrade_saved_config.test.ts | 2 -- .../create_or_upgrade_saved_config.ts | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.test.ts b/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.test.ts index fc5a55da0091..eb23e78b1756 100644 --- a/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.test.ts +++ b/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.test.ts @@ -98,7 +98,6 @@ describe('uiSettings/createOrUpgradeSavedConfig', function () { }, { id: version, - workspaces: null, } ); }); @@ -134,7 +133,6 @@ describe('uiSettings/createOrUpgradeSavedConfig', function () { }, { id: version, - workspaces: null, } ); }); diff --git a/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.ts b/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.ts index 6ca3baeb7a9f..6649966d8952 100644 --- a/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.ts +++ b/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.ts @@ -65,9 +65,6 @@ export async function createOrUpgradeSavedConfig( // create the new SavedConfig await savedObjectsClient.create('config', attributes, { id: version, - // config is a global object that should not belong to any of the workspaces - // declare it as null to prevent it being created as a workspace object - workspaces: null, }); } catch (error) { if (handleWriteErrors) {