consistently normalize email addresses as keys
Otherwise, this could make looking up user names in the inverted_user_cache dictionary to fail. Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
5c4a6dc32a
commit
8305e989c7
1 changed files with 2 additions and 2 deletions
|
@ -213,13 +213,13 @@ class BugzillaProxy:
|
||||||
return
|
return
|
||||||
self.user_cache[username] = {
|
self.user_cache[username] = {
|
||||||
'bugzilla_email': bz_email}
|
'bugzilla_email': bz_email}
|
||||||
self.inverted_user_cache[bz_email] = username
|
|
||||||
else:
|
else:
|
||||||
person = self.fas.person_by_username(username)
|
person = self.fas.person_by_username(username)
|
||||||
bz_email = person.get('bugzilla_email', None)
|
bz_email = person.get('bugzilla_email', None)
|
||||||
if bz_email is None:
|
if bz_email is None:
|
||||||
return
|
return
|
||||||
self.user_cache[username] = {'bugzilla_email': bz_email}
|
self.user_cache[username] = {'bugzilla_email': bz_email}
|
||||||
|
bz_email = bz_email.lower()
|
||||||
self.inverted_user_cache[bz_email] = username
|
self.inverted_user_cache[bz_email] = username
|
||||||
return bz_email
|
return bz_email
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue