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:
Nils Philippsen 2019-11-22 12:54:14 +01:00
parent 5c4a6dc32a
commit 8305e989c7

View file

@ -213,14 +213,14 @@ class BugzillaProxy:
return
self.user_cache[username] = {
'bugzilla_email': bz_email}
self.inverted_user_cache[bz_email] = username
else:
person = self.fas.person_by_username(username)
bz_email = person.get('bugzilla_email', None)
if bz_email is None:
return
self.user_cache[username] = {'bugzilla_email': bz_email}
self.inverted_user_cache[bz_email] = username
bz_email = bz_email.lower()
self.inverted_user_cache[bz_email] = username
return bz_email
def add_edit_component(self, package, collection, owner, description=None,