session_db: cosmetics
parent
8023bff1b6
commit
b13029ab08
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue