[Mpuls-commits] r5705 - base/trunk/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Dec 13 13:38:52 CET 2011
Author: bh
Date: 2011-12-13 13:38:52 +0100 (Tue, 13 Dec 2011)
New Revision: 5705
Modified:
base/trunk/mpulsweb/lib/export.py
Log:
Fix XLS export with all pages in one table.
The old code would create two "Master" tables (because table_order would
be initialized with one "master" entry. It would also produce an
exception, because the XLS export code expects table names to be unicode
objects and in the case of one table for all pages, the table name was a
byte-string (only the unicode.translate method supports dictionaries as
arguments).
Modified: base/trunk/mpulsweb/lib/export.py
===================================================================
--- base/trunk/mpulsweb/lib/export.py 2011-12-13 12:30:21 UTC (rev 5704)
+++ base/trunk/mpulsweb/lib/export.py 2011-12-13 12:38:52 UTC (rev 5705)
@@ -102,8 +102,6 @@
repeat_groups = dict()
titles = dict()
table_order = []
- if not self.one_table_per_page:
- table_order.append("master")
for page in self.meta_tree.findAllByClass(PageNode):
# always export the invisible pages as they cannot be
# explicily selected by the user and they usually contain
@@ -119,7 +117,7 @@
table_title = page.getDescription()
else:
table_name = "master"
- table_title = "Master"
+ table_title = u"Master"
parent_name = "master"
for p in nc.pathToRoot():
if isinstance(p, RepeatNode):
More information about the Mpuls-commits
mailing list