forked from 0x2620/pandora
return item id, exclude empty annotations
This commit is contained in:
parent
e95c9011e7
commit
d6513d4570
2 changed files with 3 additions and 1 deletions
|
@ -237,6 +237,8 @@ class Annotation(models.Model):
|
||||||
|
|
||||||
if layer or (keys and 'layer' in keys):
|
if layer or (keys and 'layer' in keys):
|
||||||
j['layer'] = self.layer
|
j['layer'] = self.layer
|
||||||
|
if keys and 'item' in keys:
|
||||||
|
j['item'] = self.item.public_id
|
||||||
if keys:
|
if keys:
|
||||||
_j = {}
|
_j = {}
|
||||||
for key in keys:
|
for key in keys:
|
||||||
|
|
|
@ -58,7 +58,7 @@ def order_query(qs, sort):
|
||||||
order = '%s%s' % (operator, key)
|
order = '%s%s' % (operator, key)
|
||||||
order_by.append(order)
|
order_by.append(order)
|
||||||
if order_by:
|
if order_by:
|
||||||
qs = qs.order_by(*order_by, nulls_last=True)
|
qs = qs.order_by(*order_by, nulls_last=True).exclude(value='')
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
def findAnnotations(request, data):
|
def findAnnotations(request, data):
|
||||||
|
|
Loading…
Reference in a new issue