dabo Commit
Revision 5588
Date: 2010-01-05 16:39:14 -0800 (Tue, 05 Jan 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5588
Changed:
U trunk/dabo/biz/dBizobj.py
Log:
Fixed an issue with the cursor's _mementos attribute getting inadvertantly
altered by record cloning. Trac #1316
Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py 2010-01-04 02:09:02 UTC (rev 5587)
+++ trunk/dabo/biz/dBizobj.py 2010-01-06 00:39:14 UTC (rev 5588)
@@ -1637,7 +1637,12 @@
"""Creates a copy of the current record and adds it to the
dataset. The KeyField
is not copied.
"""
- self._CurrentCursor.cloneRecord()
+ cc = self._CurrentCursor
+ # Cloning the record affects the cursor's _mementos dict. Save
a copy
+ # beforehand, and restore after the call to cloneRecord().
+ memsave = cc._mementos.copy()
+ cc.cloneRecord()
+ cc._mementos = memsave
self._onNew(setDefaults=False)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]