misc: sort using key function (#36515)
This commit is contained in:
parent
11ad87508c
commit
a4743c216c
|
@ -1441,7 +1441,7 @@ class RootDirectory(AccessControlled, Directory):
|
|||
for formdef in all_formdefs:
|
||||
user_forms.extend(get_user_forms(formdef))
|
||||
user_forms = [x for x in user_forms if x.formdef.is_user_allowed_read(user, x)]
|
||||
user_forms.sort(lambda x,y: cmp(x.receipt_time, y.receipt_time))
|
||||
user_forms.sort(key=lambda x: (x.receipt_time,))
|
||||
|
||||
if self.category:
|
||||
r += self.form_list(list_forms, category = self.category,
|
||||
|
|
Loading…
Reference in New Issue