Skip to content

Commit 30691d8

Browse files
committed
Retired and Restored were unhandled by history.
Handle them properly without the scary message. Also make the message report the action that caused the problem.
1 parent 6604693 commit 30691d8

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

roundup/cgi/templating.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,11 +1153,16 @@ def history(self, direction='descending', dre=re.compile(r'^\d+$'),
11531153

11541154
arg_s = '<br />'.join(cell)
11551155
else:
1156-
# unkown event!!
1157-
comments['unknown'] = self._(
1158-
"<strong><em>This event is not handled"
1159-
" by the history display!</em></strong>")
1160-
arg_s = '<strong><em>' + str(args) + '</em></strong>'
1156+
if action in ( 'retired', 'restored' ):
1157+
# args = None for these actions
1158+
pass
1159+
else:
1160+
# unknown event!!
1161+
comments['unknown'] = self._(
1162+
"<strong><em>This event %s is not handled"
1163+
" by the history display!</em></strong>"%action)
1164+
arg_s = '<strong><em>' + str(args) + '</em></strong>'
1165+
11611166
date_s = date_s.replace(' ', '&nbsp;')
11621167
# if the user's an itemid, figure the username (older journals
11631168
# have the username)

0 commit comments

Comments
 (0)