Apply "lower" call before "locale.strxfrm" to get a correct sorting!
authorThierry Florac <tflorac@ulthar.net>
Wed, 24 Oct 2018 10:05:35 +0200
changeset 1035 857fdb137d14
parent 1034 87f03e244266
child 1036 ab9733fa4c4e
Apply "lower" call before "locale.strxfrm" to get a correct sorting!
src/pyams_content/reference/pictograms/zmi/manager.py
--- a/src/pyams_content/reference/pictograms/zmi/manager.py	Tue Oct 23 17:24:41 2018 +0200
+++ b/src/pyams_content/reference/pictograms/zmi/manager.py	Wed Oct 24 10:05:35 2018 +0200
@@ -96,8 +96,8 @@
     @property
     def sorted_pictograms(self):
         yield from sorted(self.pictogram_table.values(),
-                          key=lambda x: locale.strxfrm(II18n(x).query_attribute('title',
-                                                                                request=self.request) or '').lower())
+                          key=lambda x: locale.strxfrm((II18n(x).query_attribute('title',
+                                                                                 request=self.request) or '').lower()))
 
     @property
     def available_pictograms(self):