tables.py: fix list of lists in cells issue
authorrgbecker
Fri, 30 Dec 2011 16:56:15 +0000
changeset 3561 20c19cc4e6e4
parent 3560 39ab79a778b5
child 3562 ad5ccec5b07f
tables.py: fix list of lists in cells issue
src/reportlab/platypus/tables.py
--- a/src/reportlab/platypus/tables.py	Mon Dec 19 17:25:11 2011 +0000
+++ b/src/reportlab/platypus/tables.py	Fri Dec 30 16:56:15 2011 +0000
@@ -21,7 +21,7 @@
 from reportlab import rl_config
 from reportlab.lib.styles import PropertySet, ParagraphStyle, _baseFontName
 from reportlab.lib import colors
-from reportlab.lib.utils import fp_str, annotateException, IdentStr
+from reportlab.lib.utils import fp_str, annotateException, IdentStr, flatten
 from reportlab.lib.abag import ABag as CellFrame
 from reportlab.pdfbase.pdfmetrics import stringWidth
 from reportlab.platypus.doctemplate import Indenter
@@ -544,6 +544,7 @@
                     else:
                         if isinstance(v,(tuple,list,Flowable)):
                             if isinstance(v,Flowable): v = (v,)
+                            else: v = flatten(v)
                             v = V[j] = self._cellListProcess(v,w,None)
                             if w is None and not self._canGetWidth(v):
                                 raise ValueError("Flowable %s in cell(%d,%d) can't have auto width in\n%s" % (v[0].identity(30),i,j,self.identity(30)))