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