From 4f2b42dc08beb9cda92d887bc4ccb5c51ad18493 Mon Sep 17 00:00:00 2001 From: abutalib-kiwi Date: Thu, 16 Nov 2023 17:07:46 +0530 Subject: [PATCH 1/2] changed message --- base/messages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/messages.py b/base/messages.py index e36921f..3977895 100644 --- a/base/messages.py +++ b/base/messages.py @@ -96,8 +96,8 @@ ERROR_CODE = { "2067": "Action not allowed. User type missing.", "2068": "No guardian associated with this junior", "2069": "Invalid user type", - "2070": "You do not find as a guardian", - "2071": "You do not find as a junior", + "2070": "You are not registered as a guardian in our system. Please try again as junior.", + "2071": "You are not registered as a junior in our system. Please try again as guardian.", "2072": "You can not approve or reject this task because junior does not exist in the system", "2073": "You can not approve or reject this junior because junior does not exist in the system", "2074": "You can not complete this task because you does not exist in the system", From d614d13136f935a787509b58692e11f2d85aa384 Mon Sep 17 00:00:00 2001 From: abutalib-kiwi Date: Thu, 16 Nov 2023 17:30:32 +0530 Subject: [PATCH 2/2] added optional last name in google login --- account/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account/views.py b/account/views.py index 1034d88..a656e0b 100644 --- a/account/views.py +++ b/account/views.py @@ -74,7 +74,7 @@ class GoogleLoginMixin(object): user_info = response.json() email = user_info['email'] first_name = user_info['given_name'] - last_name = user_info['family_name'] + last_name = user_info['family_name'] if 'family_name' in user_info and user_info['family_name'] else user_info['given_name'] profile_picture = user_info['picture'] except Exception as e: return custom_error_response(str(e), response_status=status.HTTP_400_BAD_REQUEST)