diff options
author | Florian Apolloner <florian@apolloner.eu> | 2022-03-08 11:48:56 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-03-17 07:40:57 +0100 |
commit | 4f92cf87b013801810226928ddd20097f6e4fccf (patch) | |
tree | 2b29b4ae2bdd0b8adeaa03ef07ba4d66a5780b2d /django/contrib/postgres/apps.py | |
parent | 13378ad95206a96c3d1d261eb738032468a7acc1 (diff) | |
download | django-4f92cf87b013801810226928ddd20097f6e4fccf.tar.gz |
Prevented initialization of unused database connections.
Diffstat (limited to 'django/contrib/postgres/apps.py')
-rw-r--r-- | django/contrib/postgres/apps.py | 2 |
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( { |