diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-01-29 09:12:11 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-02-04 12:42:35 +0000 |
| commit | de590816d8d06730d99499db9a068f8d0e2cd3f9 (patch) | |
| tree | a138df14693c2f76614e76cd26a8fcf34d0df631 /addons/auth_oauth | |
| parent | eae19fc2cd3496d4b59e4d8029fcceb5eaa3a561 (diff) | |
[FIX] *: deprecated access to url_ utilities through werkzeug root
In 0.15 accessing werkzeug.urls functions directly through werkzeug
is deprecated, the shortcut will be removed in the eventual werkzeug
1.0.
Fix existing uses of these shortcuts. Also cleanup some imports when
they're not far from a werkzeug* import being altered.
Diffstat (limited to 'addons/auth_oauth')
| -rw-r--r-- | addons/auth_oauth/controllers/main.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index 00eea3268b6..3d1a6b53af3 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -66,7 +66,7 @@ class OAuthLogin(Home): scope=provider['scope'], state=json.dumps(state), ) - provider['auth_link'] = "%s?%s" % (provider['auth_endpoint'], werkzeug.url_encode(params)) + provider['auth_link'] = "%s?%s" % (provider['auth_endpoint'], werkzeug.urls.url_encode(params)) return providers def get_state(self, provider): @@ -76,7 +76,7 @@ class OAuthLogin(Home): state = dict( d=request.session.db, p=provider['id'], - r=werkzeug.url_quote_plus(redirect), + r=werkzeug.urls.url_quote_plus(redirect), ) token = request.params.get('token') if token: @@ -134,7 +134,7 @@ class OAuthController(http.Controller): cr.commit() action = state.get('a') menu = state.get('m') - redirect = werkzeug.url_unquote_plus(state['r']) if state.get('r') else False + redirect = werkzeug.urls.url_unquote_plus(state['r']) if state.get('r') else False url = '/web' if redirect: url = redirect |
