From 495763e01478c8157cf87fd0c683f5deffaa88cd Mon Sep 17 00:00:00 2001 From: Mike Dirolf Date: Wed, 16 Jun 2010 11:38:16 -0400 Subject: [PATCH] minor: use dropIndexes instead of delete --- pymongo/collection.py | 2 +- pymongo/dbref.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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