We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05a237e commit 239ba22Copy full SHA for 239ba22
pymongo/operations.py
@@ -332,7 +332,7 @@ def __init__(
332
self,
333
filter: Mapping[str, Any],
334
replacement: Union[_DocumentType, RawBSONDocument],
335
- upsert: bool = False,
+ upsert: Optional[bool] = None,
336
collation: Optional[_CollationIn] = None,
337
hint: Optional[_IndexKeyHint] = None,
338
namespace: Optional[str] = None,
@@ -693,7 +693,7 @@ def _add_to_bulk(self, bulkobj: _AgnosticBulk) -> None:
693
self._filter,
694
self._doc,
695
True,
696
- bool(self._upsert),
+ self._upsert,
697
collation=validate_collation_or_none(self._collation),
698
array_filters=self._array_filters,
699
hint=self._hint,
0 commit comments