web/views/baseviews.py
changeset 4335 1314772c1183
parent 4252 6c4f109c2b03
parent 4315 2f957ad8e082
child 4482 1f4f33535d9a
--- a/web/views/baseviews.py	Fri Jan 22 14:40:29 2010 +0100
+++ b/web/views/baseviews.py	Fri Jan 22 14:41:08 2010 +0100
@@ -72,13 +72,16 @@
         etype = self.cw_rset.description[row][col]
         value = self.cw_rset.rows[row][col]
 
+        if value is None:
+            self.w(u'')
+            return
         if etype == 'String':
             entity, rtype = self.cw_rset.related_entity(row, col)
             if entity is not None:
                 # yes !
                 self.w(entity.printable_value(rtype, value, format=format))
                 return
-        if etype in ('Time', 'Interval'):
+        elif etype in ('Time', 'Interval'):
             if etype == 'Interval' and isinstance(value, (int, long)):
                 # `date - date`, unlike `datetime - datetime` gives an int
                 # (number of days), not a timedelta