Skip to content

Commit 30d0519

Browse files
committed
Rename check index function
1 parent 8d69f55 commit 30d0519

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

django_mongodb_backend/checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from django.db import connections, router
66

77

8-
def check_vector_search_indexes(app_configs, databases=None, **kwargs): # noqa: ARG001
8+
def check_indexes(app_configs, databases=None, **kwargs): # noqa: ARG001
99
# Validate vector search indexes for models.
1010
errors = []
1111
if app_configs is None:
@@ -24,4 +24,4 @@ def check_vector_search_indexes(app_configs, databases=None, **kwargs): # noqa:
2424

2525

2626
def register_checks():
27-
register(Tags.models)(check_vector_search_indexes)
27+
register(Tags.models)(check_indexes)

tests/indexes_/test_checks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
override_system_checks,
77
)
88

9-
from django_mongodb_backend.checks import check_vector_search_indexes
9+
from django_mongodb_backend.checks import check_indexes
1010
from django_mongodb_backend.fields import ArrayField
1111
from django_mongodb_backend.indexes import SearchIndex, VectorSearchIndex
1212

1313

1414
@skipIfDBFeature("supports_atlas_search")
1515
@isolate_apps("indexes_", attr_name="apps")
16-
@override_system_checks([check_vector_search_indexes])
16+
@override_system_checks([check_indexes])
1717
class InvalidSearchIndexesTests(TestCase):
1818
def test_requires_atlas_search_support(self):
1919
class Article(models.Model):
@@ -41,7 +41,7 @@ class Meta:
4141

4242
@skipIfDBFeature("supports_atlas_search")
4343
@isolate_apps("indexes_", attr_name="apps")
44-
@override_system_checks([check_vector_search_indexes])
44+
@override_system_checks([check_indexes])
4545
class UnsupportedSearchIndexesTests(TestCase):
4646
def test_requires_atlas_search_support(self):
4747
class Article(models.Model):
@@ -69,7 +69,7 @@ class Meta:
6969

7070
@skipUnlessDBFeature("supports_atlas_search")
7171
@isolate_apps("indexes_", attr_name="apps")
72-
@override_system_checks([check_vector_search_indexes])
72+
@override_system_checks([check_indexes])
7373
class InvalidVectorSearchIndexesTests(TestCase):
7474
def test_requires_size(self):
7575
class Article(models.Model):

0 commit comments

Comments
 (0)