comparison rhodecode/model/notification.py @ 3255:09757b15ce7c beta

notification: don't expand %(when)s in usernames
author Mads Kiilerich <madski@unity3d.com>
date Tue, 29 Jan 2013 03:21:21 +0100
parents 3274ba9f1489
children 81397bd3e77f
comparison
equal deleted inserted replaced
3254:6dd1e4d60720 3255:09757b15ce7c
232 else: 232 else:
233 when = h.fmt_date(notification.created_on) 233 when = h.fmt_date(notification.created_on)
234 234
235 data = dict( 235 data = dict(
236 user=notification.created_by_user.username, 236 user=notification.created_by_user.username,
237 action=_map[notification.type_] 237 action=_map[notification.type_] % {'when': when},
238 ) 238 )
239 return (tmpl % data) % {'when': when} 239 return tmpl % data
240 240
241 241
242 class EmailNotificationModel(BaseModel): 242 class EmailNotificationModel(BaseModel):
243 243
244 TYPE_CHANGESET_COMMENT = Notification.TYPE_CHANGESET_COMMENT 244 TYPE_CHANGESET_COMMENT = Notification.TYPE_CHANGESET_COMMENT