Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/notifications/web/notification.py

Issue 29327106: Issue 3048 - Mark inactive notifications instead of removing them (Closed)
Patch Set: Simplify range selection and inactive check Created Sept. 11, 2015, 7:03 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sitescripts/notifications/test/parser.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/notifications/web/notification.py
===================================================================
--- a/sitescripts/notifications/web/notification.py
+++ b/sitescripts/notifications/web/notification.py
@@ -29,8 +29,6 @@
if x.count("/") == 1)
groups = []
for notification in notifications:
- if "variants" not in notification:
- continue
group_id = notification["id"]
if group_id in version_groups:
groups.append({"id": group_id, "variant": int(version_groups[group_id])})
@@ -104,6 +102,7 @@
version = params.get("lastVersion", [""])[0]
notifications = load_notifications()
groups = _determine_groups(version, notifications)
+ notifications = [x for x in notifications if not x.get("inactive", False)]
if not groups:
groups = _assign_groups(notifications)
response = _create_response(notifications, groups)
« no previous file with comments | « sitescripts/notifications/test/parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld