compute proper facet sort value

This commit is contained in:
j 2012-05-22 10:12:41 +02:00
parent 8d5dfd7413
commit 0719735feb

View file

@ -816,7 +816,7 @@ class Item(models.Model):
Facet.objects.filter(item=self, key=key, value__in=removed_values).delete()
for value in current_values:
if value not in saved_values:
sortvalue = value.lower()[:900]
sortvalue = utils.sort_string(value).lower()[:900]
Facet.objects.get_or_create(item=self, key=key, value=value, sortvalue=sortvalue)
def update_layer_facets(self):
@ -864,7 +864,7 @@ class Item(models.Model):
sortvalue = value
if key in self.person_keys + ['name']:
sortvalue = get_name_sort(value)
sortvalue = sortvalue.lower()[:900]
sortvalue = utils.sort_string(value).lower()[:900]
Facet.objects.get_or_create(item=self, key=key, value=value, sortvalue=sortvalue)
self.update_layer_facets()