Skip to content

Catching the hidden duplicate key errors#823

Open
bcavns01 wants to merge 1 commit into
yougov:masterfrom
bcavns01:patch-1
Open

Catching the hidden duplicate key errors#823
bcavns01 wants to merge 1 commit into
yougov:masterfrom
bcavns01:patch-1

Conversation

@bcavns01

Copy link
Copy Markdown

There's an except for DuplicateKeyError, but bulk_op.execute will only throw BulkWriteError with the dup key error inside of it. Add a loop through the bulk write error details to pass if the only errors are duplicate key errors.

There's an except for DuplicateKeyError, but bulk_op.execute will only throw BulkWriteError with the dup key error inside of it.  Add a loop through the bulk write error details to pass if the only errors are duplicate key errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant