changeset 798e9c54e622 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=798e9c54e622
description:
        Use autocommit transaction to reset session

        This avoids concurrency error if other requests try also to reset the 
session.

        issue9478
        review327621002
diffstat:

 trytond/security.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 0ffd5caea367 -r 798e9c54e622 trytond/security.py
--- a/trytond/security.py       Thu Jul 23 00:05:35 2020 +0200
+++ b/trytond/security.py       Sat Jul 25 07:59:07 2020 +0200
@@ -126,7 +126,7 @@
 
 def reset(dbname, session, context):
     try:
-        with Transaction().start(dbname, 0, context=context):
+        with Transaction().start(dbname, 0, context=context, autocommit=True):
             pool = _get_pool(dbname)
             Session = pool.get('ir.session')
             Session.reset(session)

Reply via email to