Subject: changeset in trytond:5.0 Remove actual stopped self from the transactions stack From: Cédric Krier <[email protected]>
changeset cf07753010cd in trytond:5.0 details: https://hg.tryton.org/trytond?cmd=changeset;node=cf07753010cd description: Remove actual stopped self from the transactions stack Stopping non-current transaction should not remove the last transaction but the last itself. issue7973 review45861002 (grafted from 677c4fc1c843232ab31a05b24ed8c1c17601ff78) diffstat: trytond/transaction.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diffs (17 lines): diff -r ea510f2ffe05 -r cf07753010cd trytond/transaction.py --- a/trytond/transaction.py Tue Jan 15 11:30:20 2019 +0100 +++ b/trytond/transaction.py Thu Jan 17 17:13:26 2019 +0100 @@ -152,8 +152,11 @@ for func, args, kwargs in self._atexit: func(*args, **kwargs) finally: - current_instance = transactions.pop() - assert current_instance is self, transactions + transactions.reverse() + try: + transactions.remove(self) + finally: + transactions.reverse() def set_context(self, context=None, **kwargs): if context is None:
