forked from 0x2620/pandora
annotation id
This commit is contained in:
parent
cb83a8a478
commit
37a32f1abb
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue