delete annotation that is not on a clip layer

This commit is contained in:
j 2012-05-30 17:29:09 +02:00
parent 24caf0e0c5
commit 04a5628268

View file

@ -172,7 +172,7 @@ class Annotation(models.Model):
def delete(self, *args, **kwargs):
super(Annotation, self).delete(*args, **kwargs)
if self.clip.annotations.count() == 0:
if self.clip and self.clip.annotations.count() == 0:
self.clip.delete()
self.item.update_find()
self.item.update_sort()