Show More
@@ -95,15 +95,14 b' class NotificationModel(BaseModel):' | |||
|
95 | 95 | log.debug('sending notifications %s to admins: %s', |
|
96 | 96 | notification_type, recipients_objs) |
|
97 | 97 | else: |
|
98 |
recipients_objs = |
|
|
98 | recipients_objs = set() | |
|
99 | 99 | for u in recipients: |
|
100 | 100 | obj = self._get_user(u) |
|
101 | 101 | if obj: |
|
102 |
recipients_objs.a |
|
|
102 | recipients_objs.add(obj) | |
|
103 | 103 | else: # we didn't find this user, log the error and carry on |
|
104 | 104 | log.error('cannot notify unknown user %r', u) |
|
105 | 105 | |
|
106 | recipients_objs = set(recipients_objs) | |
|
107 | 106 | if not recipients_objs: |
|
108 | 107 | raise Exception('no valid recipients specified') |
|
109 | 108 | |
@@ -122,7 +121,7 b' class NotificationModel(BaseModel):' | |||
|
122 | 121 | return notification |
|
123 | 122 | |
|
124 | 123 | # don't send email to person who created this comment |
|
125 |
rec_objs = set(recipients_objs).difference( |
|
|
124 | rec_objs = set(recipients_objs).difference({created_by_obj}) | |
|
126 | 125 | |
|
127 | 126 | # now notify all recipients in question |
|
128 | 127 |
General Comments 0
You need to be logged in to leave comments.
Login now