diff --git a/pandora/annotation/models.py b/pandora/annotation/models.py index da2a49a5..89dfa164 100644 --- a/pandora/annotation/models.py +++ b/pandora/annotation/models.py @@ -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()