[Zope-Checkins] CVS: ZODB3/ZODB - Connection.py:1.92

Jeremy Hylton jeremy@zope.com
Thu, 8 May 2003 18:43:08 -0400


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv21529

Modified Files:
	Connection.py 
Log Message:
Make sure object is registered when it gets a read conflict.


=== ZODB3/ZODB/Connection.py 1.91 => 1.92 ===
--- ZODB3/ZODB/Connection.py:1.91	Wed Apr 23 16:36:02 2003
+++ ZODB3/ZODB/Connection.py	Thu May  8 18:43:07 2003
@@ -316,6 +316,7 @@
         
         oid = object._p_oid
         if self._conflicts.has_key(oid):
+            self.getTransaction().register(object)
             raise ReadConflictError(oid)
         
         invalid = self._invalid
@@ -590,7 +591,7 @@
                     # Defer _p_independent() call until state is loaded.
                     return 1
                 else:
-                    self.getTransaction().register(self)
+                    self.getTransaction().register(obj)
                     self._conflicts[obj._p_oid] = 1
                     raise ReadConflictError(object=obj)
             else: