ignore broken poster frames
This commit is contained in:
parent
9881bfa62a
commit
05aa23166e
1 changed files with 7 additions and 6 deletions
|
@ -271,12 +271,13 @@ class List(models.Model):
|
|||
self.save()
|
||||
for i in self.poster_frames:
|
||||
from item.models import Item
|
||||
qs = Item.objects.filter(public_id=i['item'])
|
||||
if qs.count() > 0:
|
||||
if i.get('position'):
|
||||
frame = qs[0].frame(i['position'])
|
||||
if frame:
|
||||
frames.append(frame)
|
||||
if 'item' in i:
|
||||
qs = Item.objects.filter(public_id=i['item'])
|
||||
if qs.count() > 0:
|
||||
if i.get('position'):
|
||||
frame = qs[0].frame(i['position'])
|
||||
if frame:
|
||||
frames.append(frame)
|
||||
self.icon.name = self.path('icon.jpg')
|
||||
icon = self.icon.path
|
||||
if frames:
|
||||
|
|
Loading…
Reference in a new issue