Skip to content

Commit a22df61

Browse files
committed
Fix traceback on integer order attribute, fix comment
Ralf Schlatterbeck's commit cb39a6c95cd3 did not include hyperdb.Integer support. This commit adds it. Also fixes associated comment.
1 parent e0b056e commit a22df61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roundup/cgi/templating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2952,9 +2952,9 @@ def make_key_function(db, classname, sort_on=None):
29522952
def keyfunc(a):
29532953
if num_re.match(a):
29542954
a = linkcl.get(a, sort_on)
2955-
# In Python3 we may not compare strings and None
2955+
# In Python3 we may not compare numbers/strings and None
29562956
if a is None:
2957-
if isinstance(prop, hyperdb.Number):
2957+
if isinstance(prop, (hyperdb.Number, hyperdb.Integer)):
29582958
return 0
29592959
return ''
29602960
return a

0 commit comments

Comments
 (0)