forked from 0x2620/pandora
empty years
This commit is contained in:
parent
b515feb456
commit
494f5cfa0b
2 changed files with 5 additions and 2 deletions
|
|
@ -848,7 +848,10 @@ class Item(models.Model):
|
|||
settings.CONFIG['itemKeys'])):
|
||||
current_values += self.get(k, [])
|
||||
if not isinstance(current_values, list):
|
||||
current_values = [unicode(current_values)]
|
||||
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)]
|
||||
removed_values = filter(lambda i: i not in current_values, saved_values)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue