annotation id

This commit is contained in:
j 2011-10-26 12:37:52 +02:00
parent cb83a8a478
commit 37a32f1abb

View file

@ -108,7 +108,7 @@ 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)
Annotation.objects.filter(id=self.id).update(public_id=self.public_id)
def save(self, *args, **kwargs):
if not self.id: