do not send empty reviews list
This commit is contained in:
parent
50c2e4fda7
commit
f7cc2a0a58
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