Add a UUID to the temporary email address
This fixes a bug where two users from Launchpad could end up with the same temporary email address in StoryBoard, if they both have the same name. This would cause the migration of projects to fail since we require email addresses to be unique. Change-Id: I7f8a75b9702d81f336cfcd6881ac2d6614ee992c
This commit is contained in:
parent
d2ca0f0395
commit
1297093792
@ -15,6 +15,7 @@
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
from openid.consumer import consumer
|
||||
from openid.consumer.discover import DiscoveryFailure
|
||||
@ -150,7 +151,7 @@ class LaunchpadWriter(object):
|
||||
user = db_api.entity_create(User, {
|
||||
'openid': openid,
|
||||
'full_name': display_name,
|
||||
'email': "%s@example.com" % (display_name)
|
||||
'email': "%s-%s@example.com" % (display_name, uuid.uuid4())
|
||||
}, session=self.session)
|
||||
|
||||
self._user_map[openid] = user
|
||||
|
Loading…
x
Reference in New Issue
Block a user