changeset f23258f69504 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=f23258f69504
description:
Clear transaction cache after commit
If there are multiple commits, the data in the database may have been
modified.
issue11014
review381481003
diffstat:
trytond/transaction.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r df6f0bd6ce1e -r f23258f69504 trytond/transaction.py
--- a/trytond/transaction.py Mon Dec 13 23:10:13 2021 +0100
+++ b/trytond/transaction.py Thu Dec 16 22:12:42 2021 +0100
@@ -238,6 +238,8 @@
for datamanager in self._datamanagers:
datamanager.tpc_vote(self)
self.started_at = self.monotonic_time()
+ for cache in self.cache.values():
+ cache.clear()
Cache.commit(self)
self.connection.commit()
except Exception: