changeset 6428:32a04dc87b30

Make HTMLClass::history signature compatible to _HTMLItem::history _HTMLItem::history accepts 4 optional named parameters. If a template (e.g. issue.item.html) calls history with a named param and then is called in the context of creating a new issue, you get a traceback. Change HTMLClass::history to accept any named parameter so adding new named params to _HTMLItem::history doesn't require a change to HTMLClass::history.
author John Rouillard <rouilj@ieee.org>
date Fri, 04 Jun 2021 07:28:18 -0400
parents f08907bfd5a1
children d30c3191b6e6
files CHANGES.txt roundup/cgi/templating.py
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Thu Jun 03 21:48:28 2021 -0400
+++ b/CHANGES.txt	Fri Jun 04 07:28:18 2021 -0400
@@ -125,6 +125,8 @@
 - Fix find() with anydbm. Using protected properties raised KeyError.
   Add shortcut fast return. Both changes come from rdbms_common.py's
   find(). (John Rouillard)
+- Fix traceback caused by calling history() with arguments in a
+  non-item context.
 
 Features:
 - issue2550522 - Add 'filter' command to command-line
--- a/roundup/cgi/templating.py	Thu Jun 03 21:48:28 2021 -0400
+++ b/roundup/cgi/templating.py	Fri Jun 04 07:28:18 2021 -0400
@@ -958,7 +958,7 @@
             '\n' + \
             self.input(type="hidden", name="@action", value=action)
 
-    def history(self):
+    def history(self, **args):
         if not self.is_view_ok():
             return self._('[hidden]')
         return self._('New node - no history')

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