more cast migration
This commit is contained in:
parent
ae2f5643f7
commit
5fc4030c27
1 changed files with 4 additions and 3 deletions
|
@ -490,9 +490,10 @@ class Item(models.Model):
|
||||||
if key == 'character':
|
if key == 'character':
|
||||||
values = self.get('cast', '')
|
values = self.get('cast', '')
|
||||||
if values:
|
if values:
|
||||||
if isinstance(values[0], basestring):
|
if isinstance(values[0], basestring):
|
||||||
values = [values[0], ]
|
values = [values]
|
||||||
else:
|
if isinstance(values[0], list):
|
||||||
|
values = map(lambda x: {'actor': x[0], 'character': x[1]}, values)
|
||||||
values = [i['character'] for i in values]
|
values = [i['character'] for i in values]
|
||||||
else:
|
else:
|
||||||
values = self.get(key, '')
|
values = self.get(key, '')
|
||||||
|
|
Loading…
Reference in a new issue