Correctly use user_id instead of launchpad_id

Previously launchpad_id was set for all records, but we already
have primary key 'user_id' that should be used instead.
When merging two profiles it is possible that there are 2 known
launchpad ids or gerrit ids for the same user. Now processor writes
info-level message for such profiles

Change-Id: I27580578b10272a2e1b7e998025db523b4075a18
This commit is contained in:
Ilya Shakhat
2014-10-13 23:27:58 +04:00
committed by Ilya Shakhat
parent b9cbe4e3d1
commit 27e8be9ccc
7 changed files with 147 additions and 52 deletions

View File

@@ -39,7 +39,8 @@ def _normalize_user(user):
user['companies'].sort(key=utils.cmp_to_key(end_date_comparator))
user['user_id'] = user_processor.make_user_id(
launchpad_id=user.get('launchpad_id'),
email=user.get('email'))
emails=user.get('emails'),
gerrit_id=user.get('gerrit_id'))
def _normalize_users(users):