From 69083d15211a0fb86af8ec79a6aa386221e28e38 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 12 Nov 2019 18:33:24 +0000 Subject: [PATCH] don't return empty annotations --- pandora/clip/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora/clip/models.py b/pandora/clip/models.py index f4f55651..37641c15 100644 --- a/pandora/clip/models.py +++ b/pandora/clip/models.py @@ -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()