diff --git a/pandora/annotation/models.py b/pandora/annotation/models.py index 477c12255..eb6874502 100644 --- a/pandora/annotation/models.py +++ b/pandora/annotation/models.py @@ -123,7 +123,8 @@ class Annotation(models.Model): start=self.start, end=self.end) if created: - self.clip.save() + clip = Clip.objects.get(pk=self.clip.pk) + clip.save() super(Annotation, self).save(*args, **kwargs) diff --git a/pandora/clip/models.py b/pandora/clip/models.py index 5f5bf85ff..33ac543cc 100644 --- a/pandora/clip/models.py +++ b/pandora/clip/models.py @@ -20,7 +20,7 @@ class Clip(models.Model): created = models.DateTimeField(auto_now_add=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')