publicid can be null

This commit is contained in:
j 2011-10-19 16:29:23 +02:00
parent 2543fa4f78
commit 743a01181c
2 changed files with 3 additions and 2 deletions

View file

@ -123,7 +123,8 @@ class Annotation(models.Model):
start=self.start, start=self.start,
end=self.end) end=self.end)
if created: if created:
self.clip.save() clip = Clip.objects.get(pk=self.clip.pk)
clip.save()
super(Annotation, self).save(*args, **kwargs) super(Annotation, self).save(*args, **kwargs)

View file

@ -20,7 +20,7 @@ class Clip(models.Model):
created = models.DateTimeField(auto_now_add=True) created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True) modified = models.DateTimeField(auto_now=True)
public_id = models.CharField(max_length=128, unique=True) public_id = models.CharField(max_length=128, unique=True, null=True)
item = models.ForeignKey('item.Item', related_name='clips') item = models.ForeignKey('item.Item', related_name='clips')