minor: use dropIndexes instead of delete
This commit is contained in:
parent
fdba7b4f6b
commit
495763e014
@ -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):
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user