item can be unavailable
This commit is contained in:
parent
59bd4fffa8
commit
23143185ea
1 changed files with 4 additions and 3 deletions
|
@ -247,9 +247,10 @@ class List(models.Model):
|
||||||
from item.models import Item
|
from item.models import Item
|
||||||
qs = Item.objects.filter(public_id=i['item'])
|
qs = Item.objects.filter(public_id=i['item'])
|
||||||
if qs.count() > 0:
|
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