]> git.parisson.com Git - telemeta.git/commitdiff
Fix MediaCollection.ethnic_groups()
authorolivier <>
Tue, 16 Feb 2010 01:09:52 +0000 (01:09 +0000)
committerolivier <>
Tue, 16 Feb 2010 01:09:52 +0000 (01:09 +0000)
telemeta/models/media.py

index e479fa2e6b7a907240e8e01d4b8cde68c299b67c..d7c34a52e5016322465ad19c5bd7170f5f070cfd 100644 (file)
@@ -167,7 +167,8 @@ class MediaCollection(MediaResource):
             if item.ethnic_group and not item.ethnic_group in groups:
                 groups.append(item.ethnic_group)
 
-        groups.sort(self.__name_cmp)                
+        cmp = lambda a, b: unaccent_icmp(a.value, b.value)
+        groups.sort(cmp)                
 
         return groups
     ethnic_groups.verbose_name = _('populations / social groups')