1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #35226 -- Reallowed executing queries for dynamically created connections.

Regression in 8fb0be3500.

Thanks Florian Apolloner for the report.
This commit is contained in:
Mariusz Felisiak
2024-02-19 18:34:18 +01:00
committed by GitHub
parent 9350308f37
commit 5f637a8a8d
2 changed files with 12 additions and 0 deletions

View File

@@ -280,6 +280,8 @@ class SimpleTestCase(unittest.TestCase):
self.connection is None
and self.alias not in cls.databases
and self.alias != NO_DB_ALIAS
# Dynamically created connections are always allowed.
and self.alias in connections
):
# Connection has not yet been established, but the alias is not allowed.
message = cls._disallowed_database_msg % {