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()
|
self.save()
|
||||||
for i in self.poster_frames:
|
for i in self.poster_frames:
|
||||||
from item.models import Item
|
from item.models import Item
|
||||||
qs = Item.objects.filter(public_id=i['item'])
|
if 'item' in i:
|
||||||
if qs.count() > 0:
|
qs = Item.objects.filter(public_id=i['item'])
|
||||||
if i.get('position'):
|
if qs.count() > 0:
|
||||||
frame = qs[0].frame(i['position'])
|
if i.get('position'):
|
||||||
if frame:
|
frame = qs[0].frame(i['position'])
|
||||||
frames.append(frame)
|
if frame:
|
||||||
|
frames.append(frame)
|
||||||
self.icon.name = self.path('icon.jpg')
|
self.icon.name = self.path('icon.jpg')
|
||||||
icon = self.icon.path
|
icon = self.icon.path
|
||||||
if frames:
|
if frames:
|
||||||
|
|
Loading…
Reference in a new issue