web/views/tableview.py
branchstable
changeset 6104 a57db3faa913
parent 5997 2d15ddbfa2d8
child 6240 fd0cbb801007
--- 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,