use annotation find value

This commit is contained in:
j 2011-12-26 21:05:39 +05:30
commit 28a577d69f
4 changed files with 5 additions and 4 deletions

View file

@ -27,7 +27,7 @@ def parseCondition(condition, user):
'in': 'start',
'out': 'end',
'place': 'annotations__places__id',
'text': 'annotations__value',
'text': 'annotations__findvalue',
'user': 'annotations__user__username',
}.get(k, k)
if not k:
@ -40,7 +40,7 @@ def parseCondition(condition, user):
for l in filter(lambda l: not l.get('private', False),
settings.CONFIG['layers'])]
if k in public_layers:
return parseCondition({'key': 'annotations__value',
return parseCondition({'key': 'annotations__findvalue',
'value': v,
'operator': op}, user) \
& parseCondition({'key': 'annotations__layer',

View file

@ -48,7 +48,7 @@ def order_query(qs, sort):
if key.startswith('clip:'):
key = e['key'][len('clip:'):]
key = {
'text': 'annotations__value',
'text': 'annotations__sortvalue',
'position': 'start',
}.get(key, key)
elif key not in clip_keys: