diff --git a/pandora/item/models.py b/pandora/item/models.py index 0b4798cf8..2f1825e5f 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1078,7 +1078,9 @@ class Item(models.Model): if key in self.person_keys + ['name']: sortvalue = get_name_sort(value) sortvalue = utils.sort_string(sortvalue).lower()[:900] - Facet.objects.get_or_create(item=self, key=key, value=value, sortvalue=sortvalue) + f, created = Facet.objects.get_or_create(item=self, key=key, value=value, sortvalue=sortvalue) + if created: + Facet.objects.filter(key=key, value__iexact=value).exclude(value=value).update(value=value) saved_values.append(value.lower()) def update_facets(self):