pep8
This commit is contained in:
parent
c3cdc4ccd9
commit
507b6fed3e
1 changed files with 3 additions and 3 deletions
|
@ -16,8 +16,8 @@ logger = logging.getLogger(__name__)
|
||||||
def parse(data):
|
def parse(data):
|
||||||
query = {}
|
query = {}
|
||||||
query['range'] = [0, 100]
|
query['range'] = [0, 100]
|
||||||
if not 'group' in data:
|
if 'group' not in data:
|
||||||
query['sort'] = [{'key':'title', 'operator':'+'}]
|
query['sort'] = [{'key': 'title', 'operator': '+'}]
|
||||||
for key in ('keys', 'group', 'list', 'range', 'sort', 'query'):
|
for key in ('keys', 'group', 'list', 'range', 'sort', 'query'):
|
||||||
if key in data:
|
if key in data:
|
||||||
query[key] = data[key]
|
query[key] = data[key]
|
||||||
|
@ -26,7 +26,7 @@ def parse(data):
|
||||||
query['range'] = [0, 0]
|
query['range'] = [0, 0]
|
||||||
#print data
|
#print data
|
||||||
query['qs'] = models.Item.find(data)
|
query['qs'] = models.Item.find(data)
|
||||||
if not 'group' in query:
|
if 'group' not in query:
|
||||||
query['qs'] = order(query['qs'], query['sort'])
|
query['qs'] = order(query['qs'], query['sort'])
|
||||||
return query
|
return query
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue