forked from 0x2620/pandora
findChangeLog: don't crash if sort is unspecified
This would crash: api.findChangeLogs(keys=[]) because there's no 'name' key for changelog entries. Instead, default to chronological order, newest first.
This commit is contained in:
parent
ff3864b347
commit
f9ba4d1bf1
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ import models
|
|||
def parse_query(data, user):
|
||||
query = {}
|
||||
query['range'] = [0, 100]
|
||||
query['sort'] = [{'key':'name', 'operator':'+'}]
|
||||
query['sort'] = [{'key':'created', 'operator':'-'}]
|
||||
for key in ('keys', 'group', 'list', 'range', 'sort', 'query'):
|
||||
if key in data:
|
||||
query[key] = data[key]
|
||||
|
|
Loading…
Reference in a new issue