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 <[email protected]>
  • Loading branch information
yujin-emma committed Feb 6, 2024
1 parent 336b111 commit 8571a6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export async function importSavedObjectsFromStream({

// Create objects in bulk
const createSavedObjectsParams = {
objects: collectSavedObjectsResult.collectedObjects,
objects: dataSourceId ? collectSavedObjectsResult.collectedObjects.filter(object => object.type !== 'data-source') : collectSavedObjectsResult.collectedObjects,

Check failure on line 138 in src/core/server/saved_objects/import/import_saved_objects.ts

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

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

Check failure on line 50 in src/core/server/saved_objects/import/regenerate_ids.ts

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Delete `⏎`

0 comments on commit 8571a6f

Please sign in to comment.