From a295981c77c3aeadb21f0ddc5ca2154184ac2477 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 4 Jan 2011 01:57:40 +0530 Subject: [PATCH] merge annotations --- pandora/item/models.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index fc375676e..3ccf3f5ac 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -332,11 +332,10 @@ class Item(models.Model): l.items.remove(self) if l.items.filter(id=other.id) == 0: l.items.add(other) - #FIXME: should this really happen for layers? - for l in self.layer.all(): - l.items.remove(self) - if l.items.filter(id=other.id) == 0: - l.items.add(other) + #FIXME: should this really happen for annotations? + for a in self.annotations.all(): + a.item = other + if hasattr(self, 'files'): for f in self.files.all(): f.item = other