web/views/baseviews.py
branchstable
changeset 4315 2f957ad8e082
parent 4212 ab6573088b4a
child 4335 1314772c1183
--- a/web/views/baseviews.py	Thu Jan 21 11:07:32 2010 +0100
+++ b/web/views/baseviews.py	Thu Jan 21 11:13:39 2010 +0100
@@ -72,13 +72,16 @@
         etype = self.rset.description[row][col]
         value = self.rset.rows[row][col]
 
+        if value is None:
+            self.w(u'')
+            return
         if etype == 'String':
             entity, rtype = self.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