dabo Commit
Revision 4558
Date: 2008-10-10 15:20:45 -0700 (Fri, 10 Oct 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4558

Changed:
U   trunk/dabo/lib/reportWriter.py

Log:
Fixed an error that could happen in quick report if there aren't any 
records in the dataset. Will result in a report with the column labels
but no data.


Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2008-10-06 18:53:03 UTC (rev 4557)
+++ trunk/dabo/lib/reportWriter.py      2008-10-10 22:20:45 UTC (rev 4558)
@@ -1795,8 +1795,9 @@
                                        # to ignore those if present, and make 
report["TestCursor"] a list of
                                        # records.
                                        cursor = formdict.addElement(TestCursor)
-                                       for childrecord in child["children"]:
-                                               
cursor.addRecord(childrecord["attributes"])
+                                       if child.has_key("children"):
+                                               for childrecord in 
child["children"]:
+                                                       
cursor.addRecord(childrecord["attributes"])
                                elif child.has_key("cdata"):
                                        formdict[child["name"]] = child["cdata"]
                                elif child.has_key("attributes"):




_______________________________________________
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