forked from 0x2620/pandora
find clipQuery
This commit is contained in:
parent
ced5d06f89
commit
898aa66509
3 changed files with 32 additions and 15 deletions
|
|
@ -79,8 +79,11 @@ class Clip(models.Model):
|
|||
public_layers = [l['id']
|
||||
for l in filter(lambda l: not l.get('private', False),
|
||||
settings.CONFIG['layers'])]
|
||||
if 'annotations' in keys:
|
||||
j['annotations'] = [a.json(keys=['value', 'id', 'layer'])
|
||||
for a in self.annotations.filter(layer__name__in=public_layers).select_related()]
|
||||
for layer in filter(lambda l: l in keys, public_layers):
|
||||
j[layer] = [a.json(keys=['value'])['value']
|
||||
j[layer] = [a.json(keys=['id', 'value'])
|
||||
for a in self.annotations.filter(layer__name=layer)]
|
||||
for key in keys:
|
||||
if key not in clip_keys and key not in j:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue