Skip to content

Commit 10bdbb7

Browse files
committed
Check for None linkid in history
1 parent 1f3983e commit 10bdbb7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

roundup/cgi/templating.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,10 @@ def history(self, direction='descending', dre=re.compile('^\d+$'),
10431043
linkids = [linkid]
10441044
subml = []
10451045
for linkid in linkids:
1046+
# We're seeing things like
1047+
# {'nosy':['38', '113', None, '82']} in the wild
1048+
if linkid is None :
1049+
continue
10461050
label = classname + linkid
10471051
# if we have a label property, try to use it
10481052
# TODO: test for node existence even when
@@ -1059,7 +1063,8 @@ def history(self, direction='descending', dre=re.compile('^\d+$'),
10591063
subml.append('<strike>%s</strike>'%label)
10601064
else:
10611065
if hrefable:
1062-
subml.append('<a rel="nofollow" href="%s%s">%s</a>'%(
1066+
subml.append('<a rel="nofollow" '
1067+
'href="%s%s">%s</a>'%(
10631068
classname, linkid, label))
10641069
elif label is None:
10651070
subml.append('%s%s'%(classname,

0 commit comments

Comments
 (0)