Skip to content

Commit b3a4245

Browse files
committed
Remove workaround for MongoDB 6 in DatabaseFeatures.supports_atlas_search
Follow up to ce390e8.
1 parent 3270c6c commit b3a4245

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

django_mongodb_backend/features.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,7 @@ def django_test_skips(self):
601601
def supports_atlas_search(self):
602602
"""Does the server support Atlas search queries and search indexes?"""
603603
try:
604-
# An existing collection must be used on MongoDB 6, otherwise
605-
# the operation will not error when unsupported.
606-
self.connection.get_collection("django_migrations").list_search_indexes()
604+
self.connection.get_collection("__null").list_search_indexes()
607605
except OperationFailure:
608606
# It would be best to check the error message or error code to
609607
# avoid hiding some other exception, but the message/code varies

0 commit comments

Comments
 (0)