[odrs-web] trivial: Limit the number of unmoderated reviews



commit f1269b31bfee83bec03085ce476a89520ff7afa3
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jul 5 11:40:34 2017 +0100

    trivial: Limit the number of unmoderated reviews

 api10.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/api10.py b/api10.py
index 4654d67..24488cf 100644
--- a/api10.py
+++ b/api10.py
@@ -375,6 +375,8 @@ def moderate(user_hash, locale=None):
             item = review.__dict__
             item['user_skey'] = _get_user_key(user_hash, review.app_id)
             items_new.append(item)
+        if len(items_new) > 250:
+            break
 
     dat = json.dumps(items_new, sort_keys=True, indent=4, separators=(',', ': '))
     return Response(response=dat,


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