dabo Commit
Revision 7132
Date: 2012-04-03 05:39:47 -0700 (Tue, 03 Apr 2012)
Author: Paul
Trac: http://trac.dabodev.com/changeset/7132

Changed:
U   trunk/dabo/biz/dBizobj.py

Log:
The optimizations in r7110 are working well, however I ran into an issue
today adding a new record to a previously empty cursor: there was a 
phantom None key in the _visitedKeys set, I think because afterPointerMove()
was being called from somewhere on the empty cursor. Adding the sanity 
check fixes the issue.


Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py   2012-03-30 17:52:23 UTC (rev 7131)
+++ trunk/dabo/biz/dBizobj.py   2012-04-03 12:39:47 UTC (rev 7132)
@@ -2472,9 +2472,8 @@
                The _visitedKeys set is used for optimization of cancelAll() 
                and saveAll(), and only applies to bizobjs with no parent.
                """
-               if not self.Parent:
+               if not self.Parent and self.RowCount and self.RowNumber:
                        self._visitedKeys.add(self.getPK())
-                       #print self, len(self._visitedKeys)
 
 
        def _makeHookMethod(name, action, mainDoc=None, additionalDoc=None):



_______________________________________________
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]

Reply via email to