Skip to content

Commit 10fdf69

Browse files
WaVEVtimgraham
authored andcommitted
Edits
1 parent 34dc035 commit 10fdf69

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

django_mongodb_backend/features.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,15 +631,14 @@ def is_mongodb_6_3(self):
631631
def supports_search_indexes(self):
632632
dummy_collection = "__null"
633633
try:
634-
# Try to execute an search indexes operation over an existing collection.
634+
# Create or get dummy collection.
635635
try:
636636
collection = self.connection.database.create_collection(dummy_collection)
637637
except CollectionInvalid:
638-
# If the collection exists, it will be removed after this operation.
639638
collection = self.connection.get_collection(dummy_collection)
639+
# Check search indexes support (raises if unsupported).
640640
collection.list_search_indexes()
641641
except OperationFailure:
642-
# Operation fails then search indexes isn't supported.
643642
return False
644643
else:
645644
return True

0 commit comments

Comments
 (0)