diff options
author | t3jasKharat | 2024-05-30 15:43:22 +0530 |
---|---|---|
committer | t3jasKharat | 2024-05-30 15:43:22 +0530 |
commit | dc9f4fecc94b26f3da15bd79918d7f4179e16882 (patch) | |
tree | 4e9d7c371204a5dc7fad7be2ac863777a90f895d | |
parent | e9799049213c09273ea7d82709c958f9515f855b (diff) | |
download | Common-Interface-Project-dc9f4fecc94b26f3da15bd79918d7f4179e16882.tar.gz Common-Interface-Project-dc9f4fecc94b26f3da15bd79918d7f4179e16882.tar.bz2 Common-Interface-Project-dc9f4fecc94b26f3da15bd79918d7f4179e16882.zip |
Google login when is_active is false
-rw-r--r-- | blocks/authAPI/views.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/blocks/authAPI/views.py b/blocks/authAPI/views.py index a5dd4e59..7213775b 100644 --- a/blocks/authAPI/views.py +++ b/blocks/authAPI/views.py @@ -64,6 +64,9 @@ def GoogleOAuth2(request): # If User was created, set name to email user.username = user_info['email'] user.save() + if not user.is_active: + user.is_active = True + user.save() token, created = Token.objects.get_or_create(user=user) protocol = 'https://' if request.is_secure() else 'http://' |