MAil should be send before person is added to participants

This commit is contained in:
Shalabh Aggarwal 2012-09-26 16:45:03 +05:30
parent 6e9b0869ce
commit 2291ed3242
1 changed files with 6 additions and 5 deletions

View File

@ -1569,11 +1569,6 @@ def invitation_new_user_handler(nereid_user_id):
'invitation_code': None
})
project_obj.write(
invitation.project.id, {
'participants': [('add', [nereid_user_id])]
}
)
nereid_user = nereid_user_obj.browse(nereid_user_id)
subject = '[%s] %s Accepted the invitation to join the project' \
@ -1591,3 +1586,9 @@ def invitation_new_user_handler(nereid_user_id):
server = get_smtp_server()
server.sendmail(CONFIG['smtp_from'], receivers, email_message.as_string())
server.quit()
project_obj.write(
invitation.project.id, {
'participants': [('add', [nereid_user_id])]
}
)