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

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

Issue 29328658: Issue 2982 - Only return notifications that have at least one entry for title and message (Closed)
Patch Set: Created Sept. 25, 2015, 12:24 p.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/notification.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
@@ -67,7 +67,7 @@
return notification
def _can_be_shown(notification):
- return "title" in notification and "message" in notification
+ return notification.get("title", None) and notification.get("message", None)
def _generate_version(groups):
version = time.strftime("%Y%m%d%H%M", time.gmtime())
« no previous file with comments | « sitescripts/notifications/test/notification.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld