minor: use dropIndexes instead of delete

This commit is contained in:
Mike Dirolf 2010-06-16 11:38:16 -04:00
parent fdba7b4f6b
commit 495763e014
2 changed files with 2 additions and 2 deletions

View File

@ -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):

View File

@ -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