forked from 0x2620/pandora
backend: autocompleteSortKey -> autocompleteSort
This commit is contained in:
parent
b488e20be3
commit
ab75b70c5b
1 changed files with 2 additions and 2 deletions
|
@ -318,9 +318,9 @@ def autocomplete(request):
|
||||||
op = data.get('operator', '=')
|
op = data.get('operator', '=')
|
||||||
|
|
||||||
key = settings.CONFIG['keys'][data['key']]
|
key = settings.CONFIG['keys'][data['key']]
|
||||||
order_by = key.get('autocompleteSortKey', False)
|
order_by = key.get('autocompleteSort', False)
|
||||||
if order_by:
|
if order_by:
|
||||||
order_by = '-sort__%s' % order_by
|
order_by = ','.join(['%(operator)ssort__%(key)s' % o for o in order_by])
|
||||||
else:
|
else:
|
||||||
order_by = '-items'
|
order_by = '-items'
|
||||||
sort_type = key.get('sortType', key.get('type', 'string'))
|
sort_type = key.get('sortType', key.get('type', 'string'))
|
||||||
|
|
Loading…
Reference in a new issue