Skip to content

Commit

Permalink
fix the bug that create new with data source conflict
Browse files Browse the repository at this point in the history
Signed-off-by: yujin-emma <yujin.emma.work@gmail.com>
  • Loading branch information
yujin-emma committed Feb 6, 2024
1 parent 8571a6f commit 7a2b14a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/core/server/saved_objects/import/import_saved_objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export async function importSavedObjectsFromStream({

// Create objects in bulk
const createSavedObjectsParams = {
objects: dataSourceId ? collectSavedObjectsResult.collectedObjects.filter(object => object.type !== 'data-source') : collectSavedObjectsResult.collectedObjects,
objects: dataSourceId
? collectSavedObjectsResult.collectedObjects.filter((object) => object.type !== 'data-source')
: collectSavedObjectsResult.collectedObjects,
accumulatedErrors: errorAccumulator,
savedObjectsClient,
importIdMap,
Expand Down
1 change: 0 additions & 1 deletion src/core/server/saved_objects/import/regenerate_ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ export const regenerateIds = (objects: SavedObject[], dataSourceId: string | und
}, new Map<string, { id: string; omitOriginId?: boolean }>());
return importIdMap;
};

0 comments on commit 7a2b14a

Please sign in to comment.