From 34eedfd6e592040de268fb45c641dc1f47cfb086 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 20 Oct 2011 11:11:14 +0200 Subject: [PATCH] no empty subtitles --- pandora/item/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index 5112d0d6..2cdcbe16 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -388,6 +388,8 @@ class Item(models.Model): for l in Layer.objects.all(): ll = layers.setdefault(l.name, []) qs = Annotation.objects.filter(layer=l, item=self).select_related() + if l.name == 'subtitles': + qs = qs.exclude(value='') if l.private: if user and user.is_anonymous(): user = None