From bd2ff65fddd0259e37996e904c90ccf49c2cbb9f Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Sun, 20 Aug 2023 21:53:40 +0200 Subject: [PATCH] Fixed DatabaseCreation.get_test_db_clone_settings() for empty database name on SQLite. Empty string should be considered an in-memory SQLite database. --- django/db/backends/sqlite3/creation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/sqlite3/creation.py b/django/db/backends/sqlite3/creation.py index c334a86ac6..a9fd520b2d 100644 --- a/django/db/backends/sqlite3/creation.py +++ b/django/db/backends/sqlite3/creation.py @@ -53,7 +53,7 @@ class DatabaseCreation(BaseDatabaseCreation): def get_test_db_clone_settings(self, suffix): 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): root, ext = os.path.splitext(source_database_name)