diff roundup/cgi/templating.py @ 5325:7c7f3faa5e10

Check for None linkid in history
author Ralf Schlatterbeck <rsc@runtux.com>
date Tue, 29 May 2018 13:32:27 +0200
parents 62de601bdf6f
children 5a81a097a394
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Fri May 25 21:23:44 2018 -0400
+++ b/roundup/cgi/templating.py	Tue May 29 13:32:27 2018 +0200
@@ -1043,6 +1043,10 @@
                                 linkids = [linkid]
                             subml = []
                             for linkid in linkids:
+                                # We're seeing things like
+                                # {'nosy':['38', '113', None, '82']} in the wild
+                                if linkid is None :
+                                    continue
                                 label = classname + linkid
                                 # if we have a label property, try to use it
                                 # TODO: test for node existence even when
@@ -1059,7 +1063,8 @@
                                     subml.append('<strike>%s</strike>'%label)
                                 else:
                                     if hrefable:
-                                        subml.append('<a rel="nofollow" href="%s%s">%s</a>'%(
+                                        subml.append('<a rel="nofollow" '
+                                                     'href="%s%s">%s</a>'%(
                                             classname, linkid, label))
                                     elif label is None:
                                         subml.append('%s%s'%(classname,

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