1
0
mirror of https://github.com/django/django.git synced 2024-12-22 09:05:43 +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:
Mariusz Felisiak 2023-08-20 21:53:40 +02:00 committed by GitHub
parent 4c85d94bc0
commit bd2ff65fdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)