no empty subtitles

This commit is contained in:
j 2011-10-20 11:11:14 +02:00
parent d953debf09
commit 34eedfd6e5

View file

@ -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