handle lack of displayname

This commit is contained in:
Morgan McMillian 2017-04-24 19:05:17 -07:00
parent ebc5b4abd6
commit d40180cd42

View file

@ -142,6 +142,6 @@ def get_displayname(userid):
r = requests.get(url)
if r.status_code == 200:
data = json.loads(r.text)
if 'displayname' in data:
return data["displayname"]
else:
return userid