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

Unified Diff: sitescripts/notifications/parser.py

Issue 29322888: Issue 2707 - Remove start/end from notifications (Closed)
Patch Set: Created July 29, 2015, 10:43 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 | « no previous file | sitescripts/notifications/test/parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/notifications/parser.py
===================================================================
--- a/sitescripts/notifications/parser.py
+++ b/sitescripts/notifications/parser.py
@@ -122,10 +122,14 @@
if "inactive" in notification:
continue
current_time = datetime.datetime.now()
- if "start" in notification and current_time < notification["start"]:
- continue
- if "end" in notification and current_time > notification["end"]:
- continue
+ if "start" in notification:
Felix Dahlke 2015/07/29 10:45:11 Not entirely sure on how to best change this. This
Sebastian Noack 2015/07/29 11:28:54 This wouldn't be the same. With this patch you onl
Felix Dahlke 2015/07/29 14:30:17 Yeah it's fine to always remove them. I'll do it t
+ if current_time < notification["start"]:
+ continue
+ notification.pop("start", None)
+ if "end" in notification:
+ if current_time > notification["end"]:
+ continue
+ notification.pop("end", None)
notifications.append(notification)
except:
traceback.print_exc()
« no previous file with comments | « no previous file | sitescripts/notifications/test/parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld