fix: Always return list from get_list_of_recipients
This commit is contained in:
parent
fc2fdbe426
commit
f3132fa301
1 changed files with 5 additions and 5 deletions
|
|
@ -169,9 +169,11 @@ def get_context(context):
|
|||
attachments = self.get_attachment(doc)
|
||||
|
||||
recipients, cc, bcc = self.get_list_of_recipients(doc, context)
|
||||
if not (recipients or cc or bcc):
|
||||
return
|
||||
|
||||
users = recipients + cc + bcc
|
||||
|
||||
if not users:
|
||||
return
|
||||
|
||||
notification_doc = {
|
||||
'type': 'Alert',
|
||||
|
|
@ -277,8 +279,6 @@ def get_context(context):
|
|||
if self.send_to_all_assignees:
|
||||
recipients = recipients + get_assignees(doc)
|
||||
|
||||
if not recipients and not cc and not bcc:
|
||||
return None, None, None
|
||||
return list(set(recipients)), list(set(cc)), list(set(bcc))
|
||||
|
||||
def get_receiver_list(self, doc, context):
|
||||
|
|
@ -428,4 +428,4 @@ def get_assignees(doc):
|
|||
|
||||
recipients = [d.owner for d in assignees]
|
||||
|
||||
return recipients
|
||||
return recipients
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue