From 86b9bc08233b39a31fdc26d089b422f3eb66b409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 6 Feb 2024 13:26:34 +0100 Subject: [PATCH] Clear transaction tasks on retry of with_transaction decorator Closes #13008 (grafted from 6ba5facee41af77e391409382d9aef7a6b4b576a) --HG-- branch : 6.0 --- trytond/trytond/protocols/wrappers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/trytond/trytond/protocols/wrappers.py b/trytond/trytond/protocols/wrappers.py index 57ac7b4153..1c438dfa89 100644 --- a/trytond/trytond/protocols/wrappers.py +++ b/trytond/trytond/protocols/wrappers.py @@ -212,6 +212,7 @@ def with_transaction(readonly=None, user=0, context=None): except backend.DatabaseOperationalError: if count and not readonly_: transaction.rollback() + transaction.tasks.clear() continue logger.error('%s', request, exc_info=True) raise