Skip to content

Commit c95fdc3

Browse files
committed
default engine to django_mongodb
1 parent 6f7fd9b commit c95fdc3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

django_mongodb/utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def check_django_compatability():
2626
)
2727

2828

29-
def parse_uri(uri, engine=None, conn_max_age=None, conn_health_checks=None, test=None):
29+
def parse_uri(uri, engine="django_mongodb", conn_max_age=None, conn_health_checks=None, test=None):
3030
"""
3131
Parse a MongoDB URI and return a dictionary of Django database
3232
settings. This function is a wrapper around PyMongo's
@@ -38,9 +38,6 @@ def parse_uri(uri, engine=None, conn_max_age=None, conn_health_checks=None, test
3838
host = None
3939
port = None
4040

41-
if not engine:
42-
engine = "django_mongodb"
43-
4441
if uri["fqdn"] is not None:
4542
# If the fqdn is present, this is a SRV URI and the host is the fqdn.
4643
host = f"mongodb+srv://{uri['fqdn']}"

0 commit comments

Comments
 (0)