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 0c58a62 commit 21a7b9fCopy full SHA for 21a7b9f
mongoengine/pymongo_support.py
@@ -43,9 +43,7 @@ def count_documents(
43
if not filter and set(kwargs) <= {"max_time_ms"}:
44
# when no filter is provided, estimated_document_count
45
# is a lot faster as it uses the collection metadata
46
- return collection.estimated_document_count(
47
- session=connection._get_session(), **kwargs
48
- )
+ return collection.estimated_document_count(**kwargs)
49
else:
50
return collection.count_documents(
51
filter=filter, session=connection._get_session(), **kwargs
0 commit comments