Mercurial > kallithea
changeset 8755:d952e08eeb03
model/comment: get rid of unnecessary variable 'body' in create_notification
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Thu, 05 Nov 2020 22:27:13 +0100 |
parents | 78059b94991e |
children | b4749d02192d |
files | kallithea/model/comment.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/model/comment.py Thu Nov 05 22:17:13 2020 +0100 +++ b/kallithea/model/comment.py Thu Nov 05 22:27:13 2020 +0100 @@ -58,7 +58,6 @@ line_no=None, revision=None, pull_request=None, status_change=None, closing_pr=False): - body = comment_text # text of the comment line = '' if line_no: line = _('on line %s') % line_no @@ -160,18 +159,18 @@ email_kwargs['is_mention'] = False # create notification objects, and emails notification.NotificationModel().create( - created_by=author, subject=subj, body=body, + created_by=author, subject=subj, body=comment_text, recipients=recipients, type_=notification_type, email_kwargs=email_kwargs, ) - mention_recipients = extract_mentioned_users(body).difference(recipients) + mention_recipients = extract_mentioned_users(comment_text).difference(recipients) if mention_recipients: email_kwargs['is_mention'] = True subj = _('[Mention]') + ' ' + subj # FIXME: this subject is wrong and unused! notification.NotificationModel().create( - created_by=author, subject=subj, body=body, + created_by=author, subject=subj, body=comment_text, recipients=mention_recipients, type_=notification_type, email_kwargs=email_kwargs