(20241225) Small changes in Async Mongo.

This commit is contained in:
2024-12-25 19:47:47 +05:30
parent 1fd287900d
commit 7607a427a6
6 changed files with 587 additions and 113 deletions
+2 -2
View File
@@ -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: