##// END OF EJS Templates
fix: do not render email if we arent sending email with notification
andverb -
r5542:d9b3c623 default
parent child Browse files
Show More
@@ -117,14 +117,16 b' class NotificationModel(BaseModel):'
117 117 # add mentioned users into recipients
118 118 final_recipients = set(recipients_objs).union(mention_recipients)
119 119
120 (subject, email_body, email_body_plaintext) = \
121 EmailNotificationModel().render_email(notification_type, **email_kwargs)
120 # No need to render email if we are sending just notification
121 if with_email:
122 (subject, email_body, email_body_plaintext) = \
123 EmailNotificationModel().render_email(notification_type, **email_kwargs)
122 124
123 if not notification_subject:
124 notification_subject = subject
125 if not notification_subject:
126 notification_subject = subject
125 127
126 if not notification_body:
127 notification_body = email_body_plaintext
128 if not notification_body:
129 notification_body = email_body_plaintext
128 130
129 131 notification = Notification.create(
130 132 created_by=created_by_obj, subject=notification_subject,
General Comments 0
You need to be logged in to leave comments. Login now