[Zope3-checkins] CVS: Zope3/src/transaction -
_transaction.py:1.1.2.28
Jeremy Hylton
jeremy at zope.com
Mon Mar 29 13:47:49 EST 2004
Update of /cvs-repository/Zope3/src/transaction
In directory cvs.zope.org:/tmp/cvs-serv1545/src/transaction
Modified Files:
Tag: jeremy-txn-branch
_transaction.py
Log Message:
Make sure register() always leaves adapter in _resources.
The export-import abort test was failing because the resource wasn't
being re-registered after a subtransaction commit. Other tests
probably failed for the same reason.
=== Zope3/src/transaction/_transaction.py 1.1.2.27 => 1.1.2.28 ===
--- Zope3/src/transaction/_transaction.py:1.1.2.27 Mon Mar 29 12:03:13 2004
+++ Zope3/src/transaction/_transaction.py Mon Mar 29 13:47:49 2004
@@ -170,6 +170,11 @@
assert obj not in adapter.objects
adapter.objects.append(obj)
+ # In the presence of subtransactions, an existing adapter
+ # might be in _adapters but not in _resources.
+ if adapter not in self._resources:
+ self._resources.append(adapter)
+
def begin(self):
# If nothing has happened yet, it's fine. Otherwise, abort
# this transaction and let the txn manager create a new one.
More information about the Zope3-Checkins
mailing list