always include empty annotations

This commit is contained in:
j 2014-11-21 16:24:49 +00:00
parent 3aadc0f513
commit b8b91592b5

View file

@ -124,12 +124,13 @@ def findClips(request, data):
values.append('layer') values.append('layer')
if query['filter']: if query['filter']:
qs = qs.filter(query['filter']) qs = qs.filter(query['filter'])
for i in response['data']['items']:
if not key in i:
i[key] = []
for a in qs.values(*values): for a in qs.values(*values):
public_id = clip_public_id(a) public_id = clip_public_id(a)
for i in response['data']['items']: for i in response['data']['items']:
if i['id'] == public_id: if i['id'] == public_id:
if not key in i:
i[key] = []
l = { l = {
'id': a['public_id'], 'id': a['public_id'],
'value': a['value'], 'value': a['value'],