Skip to content

Commit 78e4d75

Browse files
committed
Change method name
1 parent dabf953 commit 78e4d75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

django_mongodb_backend/indexes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def where_node_idx(self, compiler, connection):
6060
return mql
6161

6262

63-
def create_mongodb_index(self, model, schema_editor, field=None, unique=False, column_prefix=""):
63+
def get_pymongo_index_model(self, model, schema_editor, field=None, unique=False, column_prefix=""):
6464
from collections import defaultdict
6565

6666
if self.contains_expressions:
@@ -103,5 +103,5 @@ def create_mongodb_index(self, model, schema_editor, field=None, unique=False, c
103103
def register_indexes():
104104
BuiltinLookup.as_mql_idx = builtin_lookup_idx
105105
Index._get_condition_mql = _get_condition_mql
106-
Index.create_mongodb_index = create_mongodb_index
106+
Index.get_pymongo_index_model = get_pymongo_index_model
107107
WhereNode.as_mql_idx = where_node_idx

django_mongodb_backend/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def alter_unique_together(
260260
def add_index(
261261
self, model, index, *, field=None, unique=False, column_prefix="", parent_model=None
262262
):
263-
idx = index.create_mongodb_index(
263+
idx = index.get_pymongo_index_model(
264264
model, self, field=field, unique=unique, column_prefix=column_prefix
265265
)
266266
if idx:

0 commit comments

Comments
 (0)