From b0e06fccfe9f73b8d8b39ce4338f6a781c8260f8 Mon Sep 17 00:00:00 2001 From: Binnette Date: Sun, 1 Mar 2020 11:11:27 +0100 Subject: [PATCH] add comment and change pipeline method name --- umap/settings/base.py | 2 +- umap/utils.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/umap/settings/base.py b/umap/settings/base.py index 388fa1a9..4e25b5ea 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -213,5 +213,5 @@ SOCIAL_AUTH_PIPELINE = ( 'social_core.pipeline.user.create_user', 'social_core.pipeline.social_auth.associate_user', 'social_core.pipeline.social_auth.load_extra_data', - 'umap.utils.user_details' + 'umap.utils.oauth_user_details' ) diff --git a/umap/utils.py b/umap/utils.py index 1b1f9e0e..38fb210d 100644 --- a/umap/utils.py +++ b/umap/utils.py @@ -110,8 +110,12 @@ def gzip_file(from_path, to_path): with gzip.open(to_path, 'wb') as f_out: f_out.writelines(f_in) -def user_details(strategy, details, user=None, *args, **kwargs): - """Update user details using data from provider.""" +def oauth_user_details(strategy, details, user=None, *args, **kwargs): + """ + This method is a pipeline stage only to be used with social_auth + Note this is a workaround that can break if social_auth is updated + Update user details using data from provider. + """ if not user: return