From 3db4b37cd6078035add4e89c96396415435cbf96 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 25 Oct 2011 00:03:09 +0200 Subject: [PATCH] fix facets --- pandora/item/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index ea27a3293..9f2c43365 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -721,9 +721,7 @@ class Item(models.Model): value_sort = value if key in self.person_keys: value_sort = get_name_sort(value) - f = Facet(key=key, value=value, value_sort=value_sort) - f.item = self - f.save() + Facet.objects.get_or_create(item=self, key=key, value=value, value_sort=value_sort) def path(self, name=''): h = self.itemId