Skip to content

Commit 5b3f25e

Browse files
author
Richard Jones
committed
display _some_ text even when the link isn't interesting
1 parent 290828c commit 5b3f25e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

roundup/cgi/templating.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,8 @@ def history(self, direction='descending', dre=re.compile('\d+')):
566566
# TODO: test for node existence even when
567567
# there's no labelprop!
568568
try:
569-
if labelprop is not None:
569+
if labelprop is not None and \
570+
labelprop != 'id':
570571
label = linkcl.get(linkid, labelprop)
571572
except IndexError:
572573
comments['no_link'] = _('''<strike>The
@@ -577,14 +578,16 @@ def history(self, direction='descending', dre=re.compile('\d+')):
577578
if hrefable:
578579
subml.append('<a href="%s%s">%s</a>'%(
579580
classname, linkid, label))
581+
else:
582+
subml.append(label)
580583
ml.append(sublabel + ', '.join(subml))
581584
cell.append('%s:\n %s'%(k, ', '.join(ml)))
582585
elif isinstance(prop, hyperdb.Link) and args[k]:
583586
label = classname + args[k]
584587
# if we have a label property, try to use it
585588
# TODO: test for node existence even when
586589
# there's no labelprop!
587-
if labelprop is not None:
590+
if labelprop is not None and labelprop != 'id':
588591
try:
589592
label = linkcl.get(args[k], labelprop)
590593
except IndexError:

0 commit comments

Comments
 (0)