From d5da33feb7ce7ffd04388dac0341a1df900dc077 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 16 Aug 2013 12:19:29 +0200 Subject: [PATCH] fix autocomplete operator --- pandora/item/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/views.py b/pandora/item/views.py index 8e8557b2e..9cfcb567b 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -320,6 +320,8 @@ def autocomplete(request): key = settings.CONFIG['keys'][data['key']] order_by = key.get('autocompleteSort', False) 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]) else: order_by = '-items'