From 05aa23166ea9a28657b1988b681ec8d7937e0412 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 2 Nov 2019 17:14:35 +0100 Subject: [PATCH] ignore broken poster frames --- pandora/itemlist/models.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pandora/itemlist/models.py b/pandora/itemlist/models.py index e9e877bbe..7d6963817 100644 --- a/pandora/itemlist/models.py +++ b/pandora/itemlist/models.py @@ -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: