Fix inverting the user cache

In the previous commit we changed the key from ``bugzilla_email``
to simply ``email`` to be consistent with the data we retrieve
from FAS, but it looks like we forgot to update this method which
thus results in the script failing with a KeyError on
``bugzilla_email``.

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-08-18 10:23:30 +02:00
parent 5088abf327
commit 438b5c806d

View file

@ -228,7 +228,7 @@ class BugzillaProxy:
that the bugzilla_email is the key and the username the value.
"""
for username in self.user_cache:
bz_email = self.user_cache[username]["bugzilla_email"].lower()
bz_email = self.user_cache[username]["email"].lower()
self.inverted_user_cache[bz_email] = username
def _get_bugzilla_email(self, username):