[odrs-web/production] trivial: Limit the number of unmoderated reviews
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/production] trivial: Limit the number of unmoderated reviews
- Date: Wed, 5 Jul 2017 10:41:12 +0000 (UTC)
commit b5facfe13322f926aee10a940f26742e2e311dfc
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]