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



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

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

 app/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
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]