never include empty layers

This commit is contained in:
j 2015-05-13 21:59:17 +02:00
parent 562a506d68
commit 6dd9522cc5

View file

@ -553,7 +553,6 @@ class Item(models.Model):
ll = layers.setdefault(name, []) ll = layers.setdefault(name, [])
qs = Annotation.objects.filter(layer=name, item=self).order_by( qs = Annotation.objects.filter(layer=name, item=self).order_by(
'start', 'end', 'sortvalue') 'start', 'end', 'sortvalue')
if name == 'subtitles':
qs = qs.exclude(value='') qs = qs.exclude(value='')
if l.get('private'): if l.get('private'):
if user and user.is_anonymous(): if user and user.is_anonymous():