[odrs-web/production] Properly return a sorted lit upon /fetch



commit f84bc4b15e8e3307edc7b0c87827efc2da429bd9
Author: Richard Hughes <richard hughsie com>
Date:   Thu Feb 1 08:49:39 2018 +0000

    Properly return a sorted lit upon /fetch
    
    Based on a patch from Aleix Pol <aleixpol kde org>, many thanks.

 app/views.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/views.py b/app/views.py
index 679b0df..79df844 100644
--- a/app/views.py
+++ b/app/views.py
@@ -377,7 +377,7 @@ def fetch():
         items_new.append(item_new)
 
     # sort and cut to limit
-    sorted(items_new, key=lambda item: item['score'], reverse=True)
+    items_new.sort(key=lambda item: item['score'], reverse=True)
     if item['limit'] > 0:
         items_new = items_new[:item['limit']]
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]