From fa753f240c9e68b036e32249f9ee4a9a61e31d36 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 10 Feb 2013 13:08:49 +0000 Subject: [PATCH] fix keeping items in list if id changes and it is merged with another item, fixes #1011 --- pandora/item/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 4e49b550b..b45c2bff8 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -410,7 +410,7 @@ class Item(models.Model): ''' for l in self.lists.all(): l.remove(self) - if l.items.filter(id=other.id) == 0: + if l.items.filter(id=other.id).count() == 0: l.add(other) #FIXME: should this really happen for annotations? for a in self.annotations.all():