diff --git a/pymongo/collection.py b/pymongo/collection.py index ebf0c4f08..f0fdd540d 100644 --- a/pymongo/collection.py +++ b/pymongo/collection.py @@ -673,7 +673,7 @@ class Collection(object): self.__database.connection._purge_index(self.__database.name, self.__name, name) - self.__database.command("deleteIndexes", self.__name, index=name, + self.__database.command("dropIndexes", self.__name, index=name, allowable_errors=["ns not found"]) def index_information(self): diff --git a/pymongo/dbref.py b/pymongo/dbref.py index d6a526417..47dc8c500 100644 --- a/pymongo/dbref.py +++ b/pymongo/dbref.py @@ -75,7 +75,7 @@ class DBRef(object): Generally not needed by application developers """ doc = SON([("$ref", self.collection), - ("$id", self.id)]) + ("$id", self.id)]) if self.database is not None: doc["$db"] = self.database return doc