Skip to content

Commit

Permalink
fix(import): use bulkWrite correctly COMPASS-6928 (#4545)
Browse files Browse the repository at this point in the history
use bulkWrite correctly
  • Loading branch information
lerouxb committed Jun 16, 2023
1 parent 84b81f4 commit ffb00c7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ export class WritableCollectionStream extends Writable {
result = await this.dataService.bulkWrite(
this.ns,
documents.map(
(doc: any): AnyBulkWriteOperation<Document> => ({ insertOne: doc })
(document: any): AnyBulkWriteOperation<Document> => ({
insertOne: { document },
})
),
{
ordered: this.stopOnErrors,
Expand Down

0 comments on commit ffb00c7

Please sign in to comment.