fix autocomplete operator
This commit is contained in:
parent
6eaf5a84ee
commit
d5da33feb7
1 changed files with 2 additions and 0 deletions
|
@ -320,6 +320,8 @@ def autocomplete(request):
|
||||||
key = settings.CONFIG['keys'][data['key']]
|
key = settings.CONFIG['keys'][data['key']]
|
||||||
order_by = key.get('autocompleteSort', False)
|
order_by = key.get('autocompleteSort', False)
|
||||||
if order_by:
|
if order_by:
|
||||||
|
for o in order_by:
|
||||||
|
if o['operator'] != '-': o['operator'] = ''
|
||||||
order_by = ','.join(['%(operator)ssort__%(key)s' % o for o in order_by])
|
order_by = ','.join(['%(operator)ssort__%(key)s' % o for o in order_by])
|
||||||
else:
|
else:
|
||||||
order_by = '-items'
|
order_by = '-items'
|
||||||
|
|
Loading…
Reference in a new issue