[odrs-web/production] Add support for compat_ids when getting reviews
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/production] Add support for compat_ids when getting reviews
- Date: Wed, 5 Jul 2017 13:39:13 +0000 (UTC)
commit 7459e05fa6b7828ca5c719d51d6af93f0faa0508
Author: Richard Hughes <richard hughsie com>
Date: Wed Jul 5 14:39:01 2017 +0100
Add support for compat_ids when getting reviews
api10.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/api10.py b/api10.py
index 24488cf..f81d047 100644
--- a/api10.py
+++ b/api10.py
@@ -282,6 +282,15 @@ def fetch():
except CursorError as e:
return json_error(str(e))
+ # also add any compat IDs
+ if 'compat_ids' in item:
+ for app_id in item['compat_ids']:
+ try:
+ reviews_tmp = db.review_get_for_app_id(app_id)
+ except CursorError as e:
+ return json_error(str(e))
+ reviews.extend(reviews_tmp)
+
# if user does not exist then create
user = db.user_get_by_hash(item['user_hash'])
if not user:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]