From e38e1b994dbc2172739dd025634ade4c7083458f Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 9 Oct 2019 20:43:28 +0100 Subject: [PATCH] I guess current_app isn't a function --- depicts/wikidata_oauth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depicts/wikidata_oauth.py b/depicts/wikidata_oauth.py index bc4b7c6..e3dffe3 100644 --- a/depicts/wikidata_oauth.py +++ b/depicts/wikidata_oauth.py @@ -3,7 +3,7 @@ from requests_oauthlib import OAuth1Session from urllib.parse import urlencode def api_post_request(params): - app = current_app() + app = current_app url = 'https://www.wikidata.org/w/api.php' client_key = app.config['CLIENT_KEY'] client_secret = app.config['CLIENT_SECRET'] @@ -14,7 +14,7 @@ def api_post_request(params): return oauth.post(url, data=params, timeout=4) def api_request(params): - app = current_app() + app = current_app url = 'https://www.wikidata.org/w/api.php?' + urlencode(params) client_key = app.config['CLIENT_KEY'] client_secret = app.config['CLIENT_SECRET']