diff roundup/cgi/templating.py @ 6689:994893cf3e1a

Fix traceback if an order attribute is None Fixes issue2551207.
author Ralf Schlatterbeck <rsc@runtux.com>
date Mon, 30 May 2022 18:03:39 +0200
parents 408fd477761f
children fadd8d5775a1
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Sun May 29 22:37:36 2022 -0400
+++ b/roundup/cgi/templating.py	Mon May 30 18:03:39 2022 +0200
@@ -2883,6 +2883,9 @@
     def keyfunc(a):
         if num_re.match(a):
             a = linkcl.get(a, sort_on)
+            # In Python3 we may not compare strings and None
+            if a is None :
+                return ''
         return a
     return keyfunc
 

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