dabo Commit
Revision 4556
Date: 2008-10-06 11:52:10 -0700 (Mon, 06 Oct 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4556
Changed:
U trunk/dabo/db/dCursorMixin.py
Log:
Changed the way that 'IsAdding' is determined to take into account
manually-entered PKs.
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2008-10-06 02:53:03 UTC (rev 4555)
+++ trunk/dabo/db/dCursorMixin.py 2008-10-06 18:52:10 UTC (rev 4556)
@@ -2344,9 +2344,11 @@
""" Return True if the current record is a new record."""
if self.RowCount <= 0:
return False
- recKey = self.pkExpression()
- ret = self._newRecords.has_key(recKey)
- return ret
+ try:
+ getattr(self.Record, kons.CURSOR_TMPKEY_FIELD)
+ return True
+ except dException.FieldNotFoundException:
+ return False
def _getIsPrefCursor(self):
_______________________________________________
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]