plone / plone.app.content

Various views for Plone, such as folder_contents, as well as general content infrastructure, such as base classes and name choosers.
https://pypi.org/project/plone.app.content/
7 stars 32 forks source link

Error in sorting addable items #238

Open tiberiuichim opened 2 years ago

tiberiuichim commented 2 years ago

https://github.com/plone/plone.app.content/blob/7a1bd2b60136b1fd380d4fa04bd052498548f272/plone/app/content/browser/folderfactories.py#L141-L145

If the ctype is a dictionary, then this whole thing is not sortable.

Python 3.8.8 (default, Mar 31 2021, 10:26:24) 
[GCC 10.2.0] on linux
@>>> [('a', {'a':1}), ('a', {'a':0})].sort()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: '<' not supported between instances of 'dict' and 'dict'