Details
-
Bug
-
Status: Closed
-
Unknown
-
Resolution: Fixed
-
None
-
None
-
None
Description
PYTHON-2957 introduces the "let" parameter to many crud methods, like this:
if let:
|
common.validate_is_document_type("let", let)
|
command["let"] = let
|
This is problematic because it doesn't validate falsey values:
>>> client.t.t.delete_one({}, let=False) |
<pymongo.results.DeleteResult object at 0x1125633c0> |
>>> client.t.t.delete_one({}, let=[]) |
<pymongo.results.DeleteResult object at 0x112563480> |
>>> client.t.t.delete_one({}, let=0) |
<pymongo.results.DeleteResult object at 0x1124a7fc0> |
We need to use if let is not None: instead.
Attachments
Issue Links
- is caused by
-
PYTHON-2957 Support 'let' option for multiple CRUD commands
-
- Closed
-