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):
|
||||
j['layer'] = self.layer
|
||||
if keys and 'item' in keys:
|
||||
j['item'] = self.item.public_id
|
||||
if keys:
|
||||
_j = {}
|
||||
for key in keys:
|
||||
|
|
|
@ -58,7 +58,7 @@ def order_query(qs, sort):
|
|||
order = '%s%s' % (operator, key)
|
||||
order_by.append(order)
|
||||
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
|
||||
|
||||
def findAnnotations(request, data):
|
||||
|
|
Loading…
Reference in a new issue