Skip to content

Commit f1470e8

Browse files
author
Andrey Lebedev
committed
handle properly empty date values in history
1 parent 83e8eb9 commit f1470e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roundup/cgi/templating.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,9 @@ def history(self, direction='descending', dre=re.compile('\d+')):
636636
d = date.Date(args[k]).local(timezone)
637637
cell.append('%s: %s'%(k, str(d)))
638638
if current.has_key(k):
639-
cell[-1] += ' -> %s' % date.Date(current[k]).local(timezone)
639+
if not current[k] == '(no value)' and current[k]:
640+
current[k] = date.Date(current[k]).local(timezone)
641+
cell[-1] += ' -> %s' % current[k]
640642
current[k] = str(d)
641643

642644
elif isinstance(prop, hyperdb.Interval) and args[k]:

0 commit comments

Comments
 (0)