dont include annotations on non js page on 0xdb, fixes #1875

This commit is contained in:
j 2014-01-11 09:34:54 +00:00
parent 55a3a94a8a
commit 303662fb27

View file

@ -1234,7 +1234,7 @@ def item(request, id):
clips = [] clips = []
clip = {'in': 0, 'annotations': []} clip = {'in': 0, 'annotations': []}
#logged in users should have javascript. not adding annotations makes load faster #logged in users should have javascript. not adding annotations makes load faster
if request.user.is_anonymous(): if not settings.USE_IMDB and request.user.is_anonymous():
for a in item.annotations.filter( for a in item.annotations.filter(
layer__in=models.Annotation.public_layers()).order_by('start', 'end', 'sortvalue'): layer__in=models.Annotation.public_layers()).order_by('start', 'end', 'sortvalue'):
if clip['in'] < a.start: if clip['in'] < a.start: