dabo Commit
Revision 6604
Date: 2011-05-26 02:05:45 -0700 (Thu, 26 May 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6604
Changed:
U trunk/dabo/biz/dBizobj.py
Log:
The save method behavior change to log error message instead of raising
NoRecordsException exception.
Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py 2011-05-26 00:39:13 UTC (rev 6603)
+++ trunk/dabo/biz/dBizobj.py 2011-05-26 09:05:45 UTC (rev 6604)
@@ -440,8 +440,9 @@
rp = self._RemoteProxy
if rp:
return rp.save(startTransaction=startTransaction)
- rowCount = self.RowCount
- if not self.isChanged() and rowCount:
+ if not self.RowCount:
+ dabo.log.error(_("Abort attempt to save an empty cursor
of %s.") % self.Name)
+ if not self.isChanged():
return
# Check if current data set is changed.
cursor = self._CurrentCursor
@@ -467,8 +468,7 @@
try:
# Maybe this record isn't changed but some children are.
- # We must call cursor.save() for empty dataset to get
NoRecordsException.
- if isRowChanged or isAdding or not rowCount:
+ if isRowChanged or isAdding:
# Save cursor data.
cursor.save(includeNewUnchanged=True)
if isAdding:
_______________________________________________
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]