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,8 +46,10 @@ def _order_query(qs, sort, prefix='sort__'):
|
|||
operator = ''
|
||||
key = {
|
||||
'id': 'itemId',
|
||||
'index': 'listitem__index'
|
||||
}.get(e['key'], e['key'])
|
||||
key = "%s%s" % (prefix, key)
|
||||
if key not in ('listitem__index', ):
|
||||
key = "%s%s" % (prefix, key)
|
||||
order = '%s%s' % (operator, key)
|
||||
order_by.append(order)
|
||||
if order_by:
|
||||
|
|
Loading…
Reference in a new issue