There was an error while loading. Please reload this page.
1 parent 8905bca commit 49725ffCopy full SHA for 49725ff
pymongo/cursor.py
@@ -307,7 +307,7 @@ def count(self, with_limit_and_skip=False):
307
if self.__skip:
308
command["skip"] = self.__skip
309
310
- response = self.__collection.database.command(command, ["ns missing"])
+ response = self.__collection.database.command(command, allowable_errors=["ns missing"])
311
if response.get("errmsg", "") == "ns missing":
312
return 0
313
return int(response["n"])
0 commit comments