From f0217ef9ebd6d565e80ba7c5379c1d0714780db7 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 28 Jun 2019 13:06:00 +0200 Subject: [PATCH] some sort names are not lower case, fixes #3219 --- pandora/document/models.py | 2 +- pandora/item/models.py | 2 +- pandora/person/models.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora/document/models.py b/pandora/document/models.py index 296916781..81fd4dd18 100644 --- a/pandora/document/models.py +++ b/pandora/document/models.py @@ -192,7 +192,7 @@ class Document(models.Model): sort_value = u'; '.join([get_name_sort(name) for name in values]) if not sort_value: sort_value = u'' - return sort_value + return sort_value.lower() def set_value(s, name, value): if isinstance(value, string_types): diff --git a/pandora/item/models.py b/pandora/item/models.py index 1d8a2cfd1..847436de5 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -903,7 +903,7 @@ class Item(models.Model): sort_value = u'; '.join([get_name_sort(name) for name in values]) if not sort_value: sort_value = u'' - return sort_value + return sort_value.lower() def set_value(s, name, value): if isinstance(value, string_types): diff --git a/pandora/person/models.py b/pandora/person/models.py index 784cb6481..20c637c47 100644 --- a/pandora/person/models.py +++ b/pandora/person/models.py @@ -22,7 +22,7 @@ def get_name_sort(name, sortname=None): if sortname: person.sortname = sortname person.save() - sortname = unicodedata.normalize('NFKD', person.sortname).lower() + sortname = unicodedata.normalize('NFKD', person.sortname) else: sortname = u'' return sortname