don't return empty annotations
This commit is contained in:
parent
6e10bb17d2
commit
69083d1521
1 changed files with 3 additions and 1 deletions
|
@ -121,7 +121,9 @@ class MetaClip(object):
|
||||||
annotations = annotations.filter(q)
|
annotations = annotations.filter(q)
|
||||||
entity_cache = {}
|
entity_cache = {}
|
||||||
j['annotations'] = [
|
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:
|
if 'layers' in keys:
|
||||||
j['layers'] = self.get_layers()
|
j['layers'] = self.get_layers()
|
||||||
|
|
Loading…
Reference in a new issue