Skip to content

Commit 239ba22

Browse files
committed
PYTHON-4925 Stop sending upsert:False
1 parent 05a237e commit 239ba22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymongo/operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def __init__(
332332
self,
333333
filter: Mapping[str, Any],
334334
replacement: Union[_DocumentType, RawBSONDocument],
335-
upsert: bool = False,
335+
upsert: Optional[bool] = None,
336336
collation: Optional[_CollationIn] = None,
337337
hint: Optional[_IndexKeyHint] = None,
338338
namespace: Optional[str] = None,
@@ -693,7 +693,7 @@ def _add_to_bulk(self, bulkobj: _AgnosticBulk) -> None:
693693
self._filter,
694694
self._doc,
695695
True,
696-
bool(self._upsert),
696+
self._upsert,
697697
collation=validate_collation_or_none(self._collation),
698698
array_filters=self._array_filters,
699699
hint=self._hint,

0 commit comments

Comments
 (0)