From 8a5ceae829da31d79be849bd75361d7881d83acb Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Tue, 2 Jun 2020 20:48:46 -0700 Subject: [PATCH] Fix x4 sorting --- inquisitor/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inquisitor/app.py b/inquisitor/app.py index 2232737..39ff1af 100644 --- a/inquisitor/app.py +++ b/inquisitor/app.py @@ -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['time'] if 'time' in i else i['created'] if 'created' in i else 0) + active_items.sort(key=lambda i: i['time'] if 'time' in i and i['time'] else i['created'] if 'created' in i and i['created'] else 0) logger.info("Returning {} of {} items".format(len(active_items), total)) if errors: