Skip to content

Commit 49725ff

Browse files
Rick Copelandmdirolf
authored andcommitted
Fix problem in count where it was passing ["ns missing"] as the count param rather than the intended allowable_errors param to database.command()
1 parent 8905bca commit 49725ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymongo/cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def count(self, with_limit_and_skip=False):
307307
if self.__skip:
308308
command["skip"] = self.__skip
309309

310-
response = self.__collection.database.command(command, ["ns missing"])
310+
response = self.__collection.database.command(command, allowable_errors=["ns missing"])
311311
if response.get("errmsg", "") == "ns missing":
312312
return 0
313313
return int(response["n"])

0 commit comments

Comments
 (0)