Skip to content

Commit e03bdba

Browse files
committed
better docevent timestamp for scrub-notify
- Legacy-Id: 10088
1 parent 1654c1a commit e03bdba

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

2015-08-28-scrub-notify.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
from copy import copy
66

7+
import datetime
8+
79
# boilerplate
810
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../web/"))
911
sys.path = [ basedir ] + sys.path
@@ -145,6 +147,7 @@ def is_author(item, doc):
145147
original_notify = doc.notify
146148
new_notify = ', '.join(list(items))
147149
doc.notify = new_notify
150+
doc.time = datetime.datetime.now()
148151
doc.save()
149152
e = DocEvent(type="added_comment",doc=doc,time=doc.time,by=by)
150153
e.desc = "Notify list changed from %s to %s"% (original_notify, new_notify if new_notify else '(None)')

0 commit comments

Comments
 (0)