dabo Commit
Revision 7135
Date: 2012-04-05 04:48:11 -0700 (Thu, 05 Apr 2012)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/7135
Changed:
U trunk/dabo/db/dCursorMixin.py
Log:
Added fix to prevent correction of empty rows to avoid KeyError exception for
compound primary keys.
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2012-04-03 16:42:06 UTC (rev 7134)
+++ trunk/dabo/db/dCursorMixin.py 2012-04-05 11:48:11 UTC (rev 7135)
@@ -188,7 +188,9 @@
rec = self._records[self.RowNumber]
except IndexError:
rec = {}
- self._correctFieldTypesIfNeeded(rec)
+ # Prevent correction of empty rows.
+ if rec:
+ self._correctFieldTypesIfNeeded(rec)
if isinstance(self.KeyField, tuple):
if rec:
pk = tuple([rec[kk] for kk in self.KeyField])
_______________________________________________
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]