Commit 6e78f726 authored by Jeremy Hylton's avatar Jeremy Hylton

Make sure object is registered when it gets a read conflict.

parent 6ef47401
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""Database connection support """Database connection support
$Id: Connection.py,v 1.91 2003/04/23 20:36:02 jeremy Exp $""" $Id: Connection.py,v 1.92 2003/05/08 22:43:07 jeremy Exp $"""
from __future__ import nested_scopes from __future__ import nested_scopes
...@@ -316,6 +316,7 @@ class Connection(ExportImport.ExportImport): ...@@ -316,6 +316,7 @@ class Connection(ExportImport.ExportImport):
oid = object._p_oid oid = object._p_oid
if self._conflicts.has_key(oid): if self._conflicts.has_key(oid):
self.getTransaction().register(object)
raise ReadConflictError(oid) raise ReadConflictError(oid)
invalid = self._invalid invalid = self._invalid
...@@ -590,7 +591,7 @@ class Connection(ExportImport.ExportImport): ...@@ -590,7 +591,7 @@ class Connection(ExportImport.ExportImport):
# Defer _p_independent() call until state is loaded. # Defer _p_independent() call until state is loaded.
return 1 return 1
else: else:
self.getTransaction().register(self) self.getTransaction().register(obj)
self._conflicts[obj._p_oid] = 1 self._conflicts[obj._p_oid] = 1
raise ReadConflictError(object=obj) raise ReadConflictError(object=obj)
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment