Fix sorting
This commit is contained in:
parent
f054fad53f
commit
16083d9d6e
|
@ -53,7 +53,7 @@ def root():
|
||||||
if not any(map(lambda f: f(item), filters)):
|
if not any(map(lambda f: f(item), filters)):
|
||||||
active_items.append(item)
|
active_items.append(item)
|
||||||
# Sort items by time
|
# Sort items by time
|
||||||
active_items.sort(key=lambda i: i['time'] if 'time' in i and i['time'] else 0)
|
active_items.sort(key=lambda i: i.get('time', i.get('created', 0)))
|
||||||
|
|
||||||
logger.info("Returning {} of {} items".format(len(active_items), total))
|
logger.info("Returning {} of {} items".format(len(active_items), total))
|
||||||
if errors:
|
if errors:
|
||||||
|
|
Loading…
Reference in New Issue