dabo Commit
Revision 4990
Date: 2009-01-29 18:51:32 -0800 (Thu, 29 Jan 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/4990

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

Log:
Changed the code to allow for non-dDataSet records.


Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py       2009-01-29 20:01:38 UTC (rev 4989)
+++ trunk/dabo/db/dCursorMixin.py       2009-01-30 02:51:32 UTC (rev 4990)
@@ -165,7 +165,7 @@
                """Returns the PK expression for the passed record."""
                if rec is None:
                        try:
-                               rec = 
self._records.UnfilteredDataSet[self.RowNumber]
+                               rec = self._records[self.RowNumber]
                        except IndexError:
                                rec = {}
                if isinstance(self.KeyField, tuple):
@@ -1519,7 +1519,11 @@
 
                # Faster to deal with 2 specific cases: all rows or just 
current row
                if allRows:
-                       recs = self._records.UnfilteredDataSet
+                       try:
+                               recs = self._records.UnfilteredDataSet
+                       except AttributeError:
+                               # Not a dDataSet
+                               recs = self_records
 
                        if self._newRecords:
                                recs = list(recs)



_______________________________________________
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