From 743a01181c85aaee63b48706b9a76af0d0aaed15 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 19 Oct 2011 16:29:23 +0200 Subject: [PATCH] publicid can be null --- pandora/annotation/models.py | 3 ++- pandora/clip/models.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora/annotation/models.py b/pandora/annotation/models.py index 477c1225..eb687450 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 5f5bf85f..33ac543c 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')