empty years

This commit is contained in:
j 2012-03-27 19:42:49 +02:00
parent b515feb456
commit 494f5cfa0b
2 changed files with 5 additions and 2 deletions

View file

@ -848,6 +848,9 @@ class Item(models.Model):
settings.CONFIG['itemKeys'])):
current_values += self.get(k, [])
if not isinstance(current_values, list):
if not current_values:
current_values = []
else:
current_values = [unicode(current_values)]
current_values = list(set(current_values))
saved_values = [i.value for i in Facet.objects.filter(item=self, key=key)]

View file

@ -102,7 +102,7 @@ class Person(models.Model):
def update_sort_name():
for p in Person.objects.all():
_sortname = ox.get_sort_name(p.name)
_sortname = ox.get_sort_name(p.name).lower()
_sortname = unicodedata.normalize('NFKD', _sortname)
if (not p.edited and _sortname != p.sortname) or \
(p.edited and _sortname == p.sortname):