def get_recipients(note):
 if (note.note_type in comm.EMAIL_SENIOR_REVIEWERS):
  return get_senior_reviewers()
 thread = note.thread
 recipients = thread.thread_cc.values_list('user__id', 'user__email')
 excludes = []
 if (not note.read_permission_developer):
  excludes += get_developers(note)
 if note.author:
  excludes.append((note.author.id, note.author.email))
 return [r for r in set(recipients) if (r not in excludes)]

def get_recipients ( note ) : if ( note . note_type in comm . EMAIL_SENIOR_REVIEWERS ) : return get_senior_reviewers ( ) thread = note . thread recipients = thread . thread_cc . values_list ( 'user__id' , 'user__email' ) excludes = [ ] if ( not note . read_permission_developer ) : excludes += get_developers ( note ) if note . author : excludes . append ( ( note . author . id , note . author . email ) ) return [ r for r in set ( recipients ) if ( r not in excludes ) ]
build a list of email addresses for to .