do not send empty reviews list
This commit is contained in:
parent
4760516c0a
commit
e47c8e8da3
1 changed files with 2 additions and 0 deletions
|
@ -437,6 +437,8 @@ class Item(models.Model):
|
||||||
|
|
||||||
if 'reviews' in i:
|
if 'reviews' in i:
|
||||||
i['reviews'] = self.reviews()
|
i['reviews'] = self.reviews()
|
||||||
|
if not i['reviews']:
|
||||||
|
del i['reviews']
|
||||||
if 'cast' in i and isinstance(i['cast'][0], basestring):
|
if 'cast' in i and isinstance(i['cast'][0], basestring):
|
||||||
i['cast'] = [i['cast']]
|
i['cast'] = [i['cast']]
|
||||||
if 'cast' in i and isinstance(i['cast'][0], list):
|
if 'cast' in i and isinstance(i['cast'][0], list):
|
||||||
|
|
Loading…
Reference in a new issue