Skip to content

Commit

Permalink
feat: declare workspaces as empty array for advanced settings
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Mar 24, 2024
1 parent af65ebf commit f4da902
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ export async function createOrUpgradeSavedConfig(

try {
// create the new SavedConfig
await savedObjectsClient.create('config', attributes, { id: version });
await savedObjectsClient.create('config', attributes, {
id: version,
// config is a global object that should not belong to any of the workspaces
// declare it as empty array to prevent it being created as a workspace object
workspaces: [],
});
} catch (error) {
if (handleWriteErrors) {
if (SavedObjectsErrorHelpers.isConflictError(error)) {
Expand Down

0 comments on commit f4da902

Please sign in to comment.