Skip to content

Commit f1a4311

Browse files
committed
Refactor and clean up.
1 parent 778ea0c commit f1a4311

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

django_mongodb/fields/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
from .auto import MongoAutoField
2-
from .json import register_fields
2+
from .json import register_json_field
3+
4+
5+
def register_fields():
6+
register_json_field()
7+
38

49
__all__ = ["MongoAutoField", "register_fields"]

django_mongodb/fields/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def key_transform_numeric_lookup_mixin(self, compiler, connection):
147147
return {"$and": [expr, type_in]}
148148

149149

150-
def register_fields():
150+
def register_json_field():
151151
ContainedBy.as_mql = contained_by
152152
DataContains.as_mql = data_contains
153153
HasAnyKeys.mongo_operator = "$or"

0 commit comments

Comments
 (0)