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 ):
@@ -552,15 +552,9 @@ def is_mongodb_6_3(self):
552
552
553
553
@cached_property
554
554
def supports_atlas_search (self ):
555
- dummy_collection = "__null"
556
555
try :
557
- # Create or get dummy collection.
558
- try :
559
- collection = self .connection .database .create_collection (dummy_collection )
560
- except CollectionInvalid :
561
- collection = self .connection .get_collection (dummy_collection )
562
556
# Check search indexes support (raises if unsupported).
563
- collection .list_search_indexes ()
557
+ self . connection . get_collection ( "django_migrations" ) .list_search_indexes ()
564
558
except OperationFailure :
565
559
return False
566
560
else :
You can’t perform that action at this time.
0 commit comments