mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
Fixed #18575 -- Empty DATABASES should default to dummy backend
Thanks delormemarco@gmail.com for the report.
This commit is contained in:
@@ -8,7 +8,7 @@ __all__ = ('backend', 'connection', 'connections', 'router', 'DatabaseError',
|
||||
'IntegrityError', 'DEFAULT_DB_ALIAS')
|
||||
|
||||
|
||||
if DEFAULT_DB_ALIAS not in settings.DATABASES:
|
||||
if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
|
||||
raise ImproperlyConfigured("You must define a '%s' database" % DEFAULT_DB_ALIAS)
|
||||
|
||||
connections = ConnectionHandler(settings.DATABASES)
|
||||
|
||||
Reference in New Issue
Block a user