From eee850c7a48fc09e58af5f7f4e0e82ad9d702f86 Mon Sep 17 00:00:00 2001 From: Aashutosh Rathi Date: Sat, 2 May 2020 14:11:30 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Change=20pipeline=20as=20?= =?UTF-8?q?per=20new=20response=20from=20login=20api=20(#40)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- landing/pipeline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/landing/pipeline.py b/landing/pipeline.py index ba0d22f..7bae8d2 100644 --- a/landing/pipeline.py +++ b/landing/pipeline.py @@ -6,9 +6,9 @@ def get_profile(backend, user, response, details, *args, **kwargs): small_url = None profile = Profile.objects.get_or_create(user=user)[0] if backend.name == "google-oauth2": - if response['image'].get('url'): - small_url = response['image'].get('url') - url = small_url.replace("sz=50", "sz=160") + if response['picture']: + small_url = response['picture'] + url = small_url profile.avatar_small = small_url profile.avatar = url profile.save()