From 57e2f46d77a7b259738b00e7d258197fe2bedf31 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 27 Sep 2019 20:06:22 +0100 Subject: [PATCH] Bug fix OAuth --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 25a1fd9..29a07e5 100755 --- a/app.py +++ b/app.py @@ -245,7 +245,8 @@ def get_username(): return session['username'] params = {'action': 'query', 'meta': 'userinfo', 'format': 'json'} - session['username'] = oauth_api_request(params)['query']['userinfo']['name'] + r = oauth_api_request(params) + session['username'] = r.json()['query']['userinfo']['name'] return session['username']