dabo Commit
Revision 6928
Date: 2011-10-26 16:04:11 -0700 (Wed, 26 Oct 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6928

Changed:
U   trunk/dabo/db/dCursorMixin.py
U   trunk/dabo/db/test/test_dCursorMixin.py

Log:
Refactored isChanged(): net effect is the same.


Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py       2011-10-26 21:51:01 UTC (rev 6927)
+++ trunk/dabo/db/dCursorMixin.py       2011-10-26 23:04:11 UTC (rev 6928)
@@ -793,10 +793,7 @@
                                # self.RowNumber doesn't exist (init phase?) 
Nothing's changed:
                                return False
                        recKey = self.pkExpression(rec)
-                       modrec = self._mementos.get(recKey, None)
-                       if not modrec and includeNewUnchanged:
-                               modrec = recKey in self._newRecords
-                       return bool(modrec)
+                       return recKey in self._mementos or (includeNewUnchanged 
and recKey in self._newRecords)
 
 
        def setNewFlag(self):

Modified: trunk/dabo/db/test/test_dCursorMixin.py
===================================================================
--- trunk/dabo/db/test/test_dCursorMixin.py     2011-10-26 21:51:01 UTC (rev 
6927)
+++ trunk/dabo/db/test/test_dCursorMixin.py     2011-10-26 23:04:11 UTC (rev 
6928)
@@ -5,10 +5,9 @@
 
 
 # Testing anything other than sqlite requires network access. So set these
-# flags so that only the db's you want to test against are True. DB's set as
-# False by default are probably not working as-is.
+# flags so that only the db's you want to test against are True.
 db_tests = {"sqlite": True,
-               "mysql": True,
+               "mysql": False,
                "firebird": False,
                "postgresql": False,
                "mssql": 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]

Reply via email to