mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed DatabaseCreation.get_test_db_clone_settings() for empty database name on SQLite.
Empty string should be considered an in-memory SQLite database.
This commit is contained in:
parent
4c85d94bc0
commit
bd2ff65fdd
@ -53,7 +53,7 @@ class DatabaseCreation(BaseDatabaseCreation):
|
|||||||
|
|
||||||
def get_test_db_clone_settings(self, suffix):
|
def get_test_db_clone_settings(self, suffix):
|
||||||
orig_settings_dict = self.connection.settings_dict
|
orig_settings_dict = self.connection.settings_dict
|
||||||
source_database_name = orig_settings_dict["NAME"]
|
source_database_name = orig_settings_dict["NAME"] or ":memory:"
|
||||||
|
|
||||||
if not self.is_in_memory_db(source_database_name):
|
if not self.is_in_memory_db(source_database_name):
|
||||||
root, ext = os.path.splitext(source_database_name)
|
root, ext = os.path.splitext(source_database_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user