Skip to content

Commit dc5c3c4

Browse files
Update checks.py
1 parent a1e2a78 commit dc5c3c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

django_ltree/checks.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ def check_database_backend_is_postgres(app_configs, **kwargs):
88
errors = []
99
valid_dbs = ["postgres", "postgis"]
1010

11-
if not any(d in settings.DATABASES["default"]["ENGINE"] for d in valid_dbs):
11+
if "default" in settings.DATABASES and all(
12+
d not in settings.DATABASES["default"]["ENGINE"] for d in valid_dbs
13+
):
1214
errors.append(
1315
Warning(
1416
"django_ltree needs postgres to support install the ltree extension.",

0 commit comments

Comments
 (0)