forked from 0x2620/pandora
sort by index, should only be used with static lists
This commit is contained in:
parent
8fffc75354
commit
04d35b43db
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ def _order_query(qs, sort, prefix='sort__'):
|
|||
operator = ''
|
||||
key = {
|
||||
'id': 'itemId',
|
||||
'index': 'listitem__index'
|
||||
}.get(e['key'], e['key'])
|
||||
if key not in ('listitem__index', ):
|
||||
key = "%s%s" % (prefix, key)
|
||||
order = '%s%s' % (operator, key)
|
||||
order_by.append(order)
|
||||
|
|
Loading…
Reference in a new issue