Skip to content

Commit 495763e

Browse files
author
Mike Dirolf
committed
minor: use dropIndexes instead of delete
1 parent fdba7b4 commit 495763e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pymongo/collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ def drop_index(self, index_or_name):
673673

674674
self.__database.connection._purge_index(self.__database.name,
675675
self.__name, name)
676-
self.__database.command("deleteIndexes", self.__name, index=name,
676+
self.__database.command("dropIndexes", self.__name, index=name,
677677
allowable_errors=["ns not found"])
678678

679679
def index_information(self):

pymongo/dbref.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def as_doc(self):
7575
Generally not needed by application developers
7676
"""
7777
doc = SON([("$ref", self.collection),
78-
("$id", self.id)])
78+
("$id", self.id)])
7979
if self.database is not None:
8080
doc["$db"] = self.database
8181
return doc

0 commit comments

Comments
 (0)