changeset fc7e69e4e0e8 in trytond:5.0
details: https://hg.tryton.org/trytond?cmd=changeset&node=fc7e69e4e0e8
description:
        Clear transaction cache after commit

        If there are multiple commits, the data in the database may have been 
modified.

        issue11014
        review381481003
        (grafted from f23258f695042a5958e53f54de153ccdda541121)
diffstat:

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

diffs (12 lines):

diff -r 0094c39d870b -r fc7e69e4e0e8 trytond/transaction.py
--- a/trytond/transaction.py    Fri Dec 03 21:43:28 2021 +0100
+++ b/trytond/transaction.py    Thu Dec 16 22:12:42 2021 +0100
@@ -207,6 +207,8 @@
                     datamanager.commit(self)
                 for datamanager in self._datamanagers:
                     datamanager.tpc_vote(self)
+            for cache in self.cache.values():
+                cache.clear()
             self.connection.commit()
         except:
             self.rollback()

Reply via email to