Fix transaction management in create_mit_user_if_needed.

(imported from commit 063eaf5180964ad32a6feb3c899a4cc5beea6fe9)
This commit is contained in:
Tim Abbott 2013-01-23 11:33:00 -05:00
parent 72af050b32
commit 748927ad7c
1 changed files with 1 additions and 0 deletions

View File

@ -107,6 +107,7 @@ def compute_mit_user_fullname(email):
traceback.print_exc()
return email.lower()
@transaction.commit_on_success
def create_mit_user_if_needed(realm, email):
try:
return UserProfile.objects.get(user__email=email)