diff roundup/cgi/templating.py @ 7757:ab679558bb28

fix: remove mutable object as default for method/function values use immutable tuples as default value markers for parameters where a None value is valid. It does seem that the _marker objects are used in places where None would not be considered a valid value.
author John Rouillard <rouilj@ieee.org>
date Fri, 01 Mar 2024 16:16:25 -0500
parents 978285986b2c
children 20a87d228240
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Fri Mar 01 16:12:21 2024 -0500
+++ b/roundup/cgi/templating.py	Fri Mar 01 16:16:25 2024 -0500
@@ -1503,7 +1503,7 @@
 class _HTMLUser(_HTMLItem):
     """Add ability to check for permissions on users.
     """
-    _marker = []
+    _marker = ('_HTMLUserMarker')
 
     def hasPermission(self, permission, classname=_marker,
                       property=None, itemid=None):
@@ -2200,7 +2200,7 @@
 
 class DateHTMLProperty(HTMLProperty):
 
-    _marker = []
+    _marker = ('HTMLPropertyMarker')
 
     def __init__(self, client, classname, nodeid, prop, name, value,
                  anonymous=0, offset=None):

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