Clear transaction tasks on retry of with_transaction decorator

Closes #13008
(grafted from 6ba5facee41af77e391409382d9aef7a6b4b576a)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2024-02-06 13:26:34 +01:00
1 parent 1ecb43f571
commit 86b9bc0823
1 file changed
+1
+1
View File
@@ -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