Show More
@@ -117,14 +117,16 b' class NotificationModel(BaseModel):' | |||||
117 | # add mentioned users into recipients |
|
117 | # add mentioned users into recipients | |
118 | final_recipients = set(recipients_objs).union(mention_recipients) |
|
118 | final_recipients = set(recipients_objs).union(mention_recipients) | |
119 |
|
119 | |||
120 | (subject, email_body, email_body_plaintext) = \ |
|
120 | # No need to render email if we are sending just notification | |
121 | EmailNotificationModel().render_email(notification_type, **email_kwargs) |
|
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: |
|
125 | if not notification_subject: | |
124 | notification_subject = subject |
|
126 | notification_subject = subject | |
125 |
|
127 | |||
126 | if not notification_body: |
|
128 | if not notification_body: | |
127 | notification_body = email_body_plaintext |
|
129 | notification_body = email_body_plaintext | |
128 |
|
130 | |||
129 | notification = Notification.create( |
|
131 | notification = Notification.create( | |
130 | created_by=created_by_obj, subject=notification_subject, |
|
132 | created_by=created_by_obj, subject=notification_subject, |
General Comments 0
You need to be logged in to leave comments.
Login now