Commit 551f1479 authored by Sebastien Robin's avatar Sebastien Robin

fixed error when doing sort with Folder.objectValues : LazyMap instance has not attribute sort

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5094 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bc24b1e5
......@@ -38,6 +38,7 @@ from Products.CMFCore.DirectoryView import registerDirectory
from Products.CMFCore.utils import getToolByName
from Products.PageTemplates.Expressions import getEngine
from Products.PageTemplates.Expressions import SecureModuleImporter
from Products.ZCatalog.Lazy import LazyMap
from Products.ERP5Type import Permissions
from Products.ERP5Type import Constraint
......@@ -116,6 +117,9 @@ def sortValueList(value_list, sort_on=None, sort_order=None, **kw):
break
return result
if isinstance(value_list,LazyMap):
new_value_list = [x for x in value_list]
value_list = new_value_list
value_list.sort(sortValues)
return value_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment