sort by index, should only be used with static lists

This commit is contained in:
j 2013-07-17 12:44:29 +00:00
parent 8fffc75354
commit 04d35b43db

View file

@ -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: