summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/apps.py
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2022-03-08 11:48:56 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-03-17 07:40:57 +0100
commit4f92cf87b013801810226928ddd20097f6e4fccf (patch)
tree2b29b4ae2bdd0b8adeaa03ef07ba4d66a5780b2d /django/contrib/postgres/apps.py
parent13378ad95206a96c3d1d261eb738032468a7acc1 (diff)
downloaddjango-4f92cf87b013801810226928ddd20097f6e4fccf.tar.gz
Prevented initialization of unused database connections.
Diffstat (limited to 'django/contrib/postgres/apps.py')
-rw-r--r--django/contrib/postgres/apps.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/postgres/apps.py b/django/contrib/postgres/apps.py
index d917201f05..79fbe57c8f 100644
--- a/django/contrib/postgres/apps.py
+++ b/django/contrib/postgres/apps.py
@@ -51,7 +51,7 @@ class PostgresConfig(AppConfig):
def ready(self):
setting_changed.connect(uninstall_if_needed)
# Connections may already exist before we are called.
- for conn in connections.all():
+ for conn in connections.all(initialized_only=True):
if conn.vendor == "postgresql":
conn.introspection.data_types_reverse.update(
{