[tableview] take care, description may include None (try Any NULL) stable
authorAlexandre Richardson <alexandre.richardson@logilab.fr>
Thu, 12 Aug 2010 14:41:44 +0200
branchstable
changeset 6104 a57db3faa913
parent 6103 072f23f6bf83
child 6105 a648c832da1f
[tableview] take care, description may include None (try Any NULL)
web/views/tableview.py
--- a/web/views/tableview.py	Thu Aug 12 11:56:33 2010 +0200
+++ b/web/views/tableview.py	Thu Aug 12 14:41:44 2010 +0200
@@ -267,6 +267,8 @@
         if val is None:
             return u''
         etype = self.cw_rset.description[row][col]
+        if etype is None:
+            return u''
         if self._cw.vreg.schema.eschema(etype).final:
             entity, rtype = self.cw_rset.related_entity(row, col)
             if entity is None:
@@ -292,7 +294,7 @@
         :param cellvid: cell view (defaults to 'outofcontext')
         """
         etype, val = self.cw_rset.description[row][col], self.cw_rset[row][col]
-        if val is not None and not self._cw.vreg.schema.eschema(etype).final:
+        if val is not None and etype is not None and not self._cw.vreg.schema.eschema(etype).final:
             self.wview(cellvid or 'outofcontext', self.cw_rset, row=row, col=col)
         elif val is None:
             # This is usually caused by a left outer join and in that case,