# HG changeset patch # User Thomas De Schampheleire # Date 1604611633 -3600 # Node ID d952e08eeb03e8b66adee3195bf51ad7975529af # Parent 78059b94991e757ab1e187a40a16d472e9d5661d model/comment: get rid of unnecessary variable 'body' in create_notification diff -r 78059b94991e -r d952e08eeb03 kallithea/model/comment.py --- 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