do not send empty reviews list

This commit is contained in:
j 2011-08-09 10:37:37 +02:00
parent 50c2e4fda7
commit f7cc2a0a58

View file

@ -437,6 +437,8 @@ class Item(models.Model):
if 'reviews' in i:
i['reviews'] = self.reviews()
if not i['reviews']:
del i['reviews']
if 'cast' in i and isinstance(i['cast'][0], basestring):
i['cast'] = [i['cast']]
if 'cast' in i and isinstance(i['cast'][0], list):