From f6bfa26ae3bb8ad9ffd1d09d9a92e4019667162a Mon Sep 17 00:00:00 2001 From: j Date: Thu, 26 Nov 2015 09:21:52 +0100 Subject: [PATCH] dont count empty annots --- pandora/item/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 1b8afcdc..b4574d2a 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -942,7 +942,7 @@ class Item(models.Model): for key in ('hue', 'saturation', 'lightness'): if key in self.data: setattr(s, key, self.data.get(key, None)) - s.numberofannotations = self.annotations.count() + s.numberofannotations = self.annotations.exclude(value='').count() s.numberofcuts = len(self.data.get('cuts', [])) s.numberofdocuments = self.documents.count() if s.duration: