From b13029ab08a121247e93dbe6165249fef0ec10f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 10 Feb 2023 19:21:10 +0100 Subject: [PATCH] session_db: cosmetics --- session_db/pg_session_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/session_db/pg_session_store.py b/session_db/pg_session_store.py index 189be9658..1a6e3a2d4 100644 --- a/session_db/pg_session_store.py +++ b/session_db/pg_session_store.py @@ -69,7 +69,6 @@ class PGSessionStore(sessions.SessionStore): @with_lock def _open_connection(self): - cnx = odoo.sql_db.db_connect(self._uri, allow_uri=True) try: # return cursor to the pool if self._cr is not None: @@ -77,6 +76,7 @@ class PGSessionStore(sessions.SessionStore): self._cr = None except Exception: # pylint: disable=except-pass pass + cnx = odoo.sql_db.db_connect(self._uri, allow_uri=True) self._cr = cnx.cursor() self._cr._cnx.autocommit = True