diff roundup/cgi/templating.py @ 1405:2158bdbcac37

handle properly empty date values in history
author Andrey Lebedev <kedder@users.sourceforge.net>
date Mon, 27 Jan 2003 17:34:03 +0000
parents 27586da5557c
children 8dc60d87ab42
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Mon Jan 27 17:02:46 2003 +0000
+++ b/roundup/cgi/templating.py	Mon Jan 27 17:34:03 2003 +0000
@@ -636,7 +636,9 @@
                             d = date.Date(args[k]).local(timezone)
                             cell.append('%s: %s'%(k, str(d)))
                             if current.has_key(k):
-                                cell[-1] += ' -> %s' % date.Date(current[k]).local(timezone)
+                                if not current[k] == '(no value)' and current[k]:
+                                    current[k] = date.Date(current[k]).local(timezone)
+                                cell[-1] += ' -> %s' % current[k]
                                 current[k] = str(d)
 
                         elif isinstance(prop, hyperdb.Interval) and args[k]:

Roundup Issue Tracker: http://roundup-tracker.org/