fix bug in legacy .count due to with_limit_and_skip that was missing

This commit is contained in:
Bastien Gérard 2020-01-12 11:04:05 +01:00
parent 53cf26b9af
commit 412bed0f6d

View File

@ -44,7 +44,8 @@ def count_documents(
for option, option_value in kwargs.items():
cursor_method = getattr(cursor, option)
cursor = cursor_method(option_value)
return cursor.count()
with_limit_and_skip = "skip" in kwargs or "limit" in kwargs
return cursor.count(with_limit_and_skip=with_limit_and_skip)
def list_collection_names(db, include_system_collections=False):