This commit is contained in:
j 2019-01-17 15:57:55 +05:30
parent c3cdc4ccd9
commit 507b6fed3e

View file

@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)
def parse(data):
query = {}
query['range'] = [0, 100]
if not 'group' in data:
if 'group' not in data:
query['sort'] = [{'key': 'title', 'operator': '+'}]
for key in ('keys', 'group', 'list', 'range', 'sort', 'query'):
if key in data:
@ -26,7 +26,7 @@ def parse(data):
query['range'] = [0, 0]
#print data
query['qs'] = models.Item.find(data)
if not 'group' in query:
if 'group' not in query:
query['qs'] = order(query['qs'], query['sort'])
return query