From 37a32f1abb139ed08d8cf85a2a109cf8409d697e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 26 Oct 2011 12:37:52 +0200 Subject: [PATCH] annotation id --- pandora/annotation/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/annotation/models.py b/pandora/annotation/models.py index 833dc44a6..b6d8cce56 100644 --- a/pandora/annotation/models.py +++ b/pandora/annotation/models.py @@ -107,8 +107,8 @@ class Annotation(models.Model): def set_public_id(self): public_id = Annotation.objects.filter(item=self.item, id__lt=self.id).count() - self.public_id = "%s/%s" % ( self.item.itemId, ox.to26(public_id)) - Annotation.objects.filter(id=self.id).update(public_id=public_id) + self.public_id = "%s/%s" % (self.item.itemId, ox.to26(public_id)) + Annotation.objects.filter(id=self.id).update(public_id=self.public_id) def save(self, *args, **kwargs): if not self.id: