File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 1
1
from django .db .backends .base .features import BaseDatabaseFeatures
2
2
from django .utils .functional import cached_property
3
- from pymongo .errors import CollectionInvalid , OperationFailure
3
+ from pymongo .errors import OperationFailure
4
4
5
5
6
6
class DatabaseFeatures (BaseDatabaseFeatures ):
@@ -615,15 +615,9 @@ def is_mongodb_6_3(self):
615
615
616
616
@cached_property
617
617
def supports_atlas_search (self ):
618
- dummy_collection = "__null"
619
618
try :
620
- # Create or get dummy collection.
621
- try :
622
- collection = self .connection .database .create_collection (dummy_collection )
623
- except CollectionInvalid :
624
- collection = self .connection .get_collection (dummy_collection )
625
619
# Check search indexes support (raises if unsupported).
626
- collection .list_search_indexes ()
620
+ self . connection . get_collection ( "django_migrations" ) .list_search_indexes ()
627
621
except OperationFailure :
628
622
return False
629
623
else :
You can’t perform that action at this time.
0 commit comments