From 37cc6a9dce3354cd37f23ee972bc25b0e5cebd5c Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 14 Feb 2019 07:04:55 -0800 Subject: [2.2.x] Fixed #30171 -- Fixed DatabaseError in servers tests. Made DatabaseWrapper thread sharing logic reentrant. Used a reference counting like scheme to allow nested uses. The error appeared after 8c775391b78b2a4a2b57c5e89ed4888f36aada4b. Backport of 76990cbbda5d93fda560c8a5ab019860f7efaab7 from master. --- django/db/backends/postgresql/base.py | 1 - 1 file changed, 1 deletion(-) (limited to 'django/db/backends/postgresql') diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index e9db668a4d..4376b8609c 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -277,7 +277,6 @@ class DatabaseWrapper(BaseDatabaseWrapper): return self.__class__( {**self.settings_dict, 'NAME': connection.settings_dict['NAME']}, alias=self.alias, - allow_thread_sharing=False, ) return nodb_connection -- cgit v1.3