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