don't return empty annotations

This commit is contained in:
j 2019-11-12 18:33:24 +00:00
parent 6e10bb17d2
commit 69083d1521

View file

@ -121,7 +121,9 @@ class MetaClip(object):
annotations = annotations.filter(q)
entity_cache = {}
j['annotations'] = [
a.json(keys=['value', 'id', 'layer'], entity_cache=entity_cache) for a in annotations
a.json(keys=['value', 'id', 'layer'], entity_cache=entity_cache)
for a in annotations
if a.value
]
if 'layers' in keys:
j['layers'] = self.get_layers()