Commit 2cb5c6fd authored by Jim Fulton's avatar Jim Fulton

Added check for conflict resolution in defered return of serial

numbers.
parent 1ec68ced
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Database connection support """Database connection support
$Id: Connection.py,v 1.46 2001/03/15 13:16:26 jim Exp $""" $Id: Connection.py,v 1.47 2001/03/20 04:00:17 jim Exp $"""
__version__='$Revision: 1.46 $'[11:-2] __version__='$Revision: 1.47 $'[11:-2]
from cPickleCache import PickleCache from cPickleCache import PickleCache
from POSException import ConflictError, ExportError from POSException import ConflictError, ExportError
...@@ -391,11 +391,17 @@ class Connection(ExportImport.ExportImport): ...@@ -391,11 +391,17 @@ class Connection(ExportImport.ExportImport):
if _type(s) is not _st: raise s if _type(s) is not _st: raise s
o=get(oi, oi) o=get(oi, oi)
if o is not oi: if o is not oi:
o._p_serial=s if s is ResolvedSerial:
o._p_changed=0 o._p_changed=None
else:
o._p_serial=s
o._p_changed=0
elif oi == oid: elif oi == oid:
object._p_serial=s if s is ResolvedSerial:
object._p_changed=0 object._p_changed=None
else:
object._p_serial=s
object._p_changed=0
try: cache[oid]=object try: cache[oid]=object
except: except:
...@@ -624,8 +630,11 @@ class Connection(ExportImport.ExportImport): ...@@ -624,8 +630,11 @@ class Connection(ExportImport.ExportImport):
o=get(oid, oid) o=get(oid, oid)
if o is not oid: if o is not oid:
if _type(s) is not _st: raise s if _type(s) is not _st: raise s
o._p_serial=s if s is ResolvedSerial:
o._p_changed=0 o._p_changed=None
else:
o._p_serial=s
o._p_changed=0
def tpc_finish(self, transaction): def tpc_finish(self, transaction):
......
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