(20241225) Small changes in Async Mongo.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -658,7 +658,7 @@ class AsyncMongo(AsyncMongoBase):
|
||||
:param upsert: If you want to insert if the document doesn't already exist.
|
||||
:param session: The session if you need to do this in a transaction.
|
||||
:param raise_exception: Whether, or not, you want to raise an exception when something fails.
|
||||
:return: True or False based on the success of the operation.
|
||||
:return: The no. of records that were affected.
|
||||
"""
|
||||
|
||||
# Ensure you are connected:
|
||||
@@ -675,7 +675,7 @@ class AsyncMongo(AsyncMongoBase):
|
||||
upsert = upsert,
|
||||
session = session
|
||||
)
|
||||
update_count = response.modified_count + response.upserted_count
|
||||
update_count = response.modified_count
|
||||
|
||||
# When something goes wrong:
|
||||
except Exception as exception:
|
||||
|
||||
Reference in New Issue
Block a user