[odrs-web/production] Use limit=0 for unlimited
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/production] Use limit=0 for unlimited
- Date: Wed, 15 Mar 2017 09:39:29 +0000 (UTC)
commit 462c9cee7d429d10f95e8e3955f367a917a4290d
Author: Richard Hughes <richard hughsie com>
Date: Wed Mar 15 09:37:29 2017 +0000
Use limit=0 for unlimited
api10.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/api10.py b/api10.py
index 9992dea..ff89bad 100644
--- a/api10.py
+++ b/api10.py
@@ -278,7 +278,8 @@ def fetch():
# sort and cut to limit
sorted(items_new, key=lambda item: item['score'])
- items_new = items_new[:item['limit']]
+ if item['limit'] > 0:
+ items_new = items_new[:item['limit']]
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]