def post_create_comm_note(note):
 thread = note.thread
 obj = thread.obj
 for developer in obj.authors.all():
  thread.join_thread(developer)
 try:
  nonuser_mozilla_contacts = []
  for email in obj.get_mozilla_contacts():
   try:
    moz_contact = UserProfile.objects.get(email=email)
    thread.join_thread(moz_contact)
   except UserProfile.DoesNotExist:
    nonuser_mozilla_contacts.append((None, email))
  utils_mail.email_recipients(nonuser_mozilla_contacts, note, extra_context={'nonuser_mozilla_contact': True})
 except AttributeError:
  pass
 author = note.author
 if author:
  (cc, created_cc) = thread.join_thread(author)
 utils_mail.send_mail_comm(note)

def post_create_comm_note ( note ) : thread = note . thread obj = thread . obj for developer in obj . authors . all ( ) : thread . join_thread ( developer ) try : nonuser_mozilla_contacts = [ ] for email in obj . get_mozilla_contacts ( ) : try : moz_contact = UserProfile . objects . get ( email = email ) thread . join_thread ( moz_contact ) except UserProfile . DoesNotExist : nonuser_mozilla_contacts . append ( ( None , email ) ) utils_mail . email_recipients ( nonuser_mozilla_contacts , note , extra_context = { 'nonuser_mozilla_contact' : True } ) except AttributeError : pass author = note . author if author : ( cc , created_cc ) = thread . join_thread ( author ) utils_mail . send_mail_comm ( note )
stuff to do after creating note .